orgsync/active_interaction — pull request #221 by aaronjensen (2014-09-02 23:30:58+00:00)
Title: WIP: instance_eval defaults

This is WIP, just opening to discuss.

First mentioned in https://github.com/orgsync/active_interaction/issues/217, we too are interested in `instance_eval`'d defaults. As a first pass, I'm looking at how to pull any calls to `default` out from inside of filter so as to not require an instance to be passed around to all things that may eventually call `default`. This has some problems, w/ this branch the hash default spec fails, and I don't know what else I'm going to run into.

```
1) HashInteraction with inputs[:a] returns the correct value for :b
Failure/Error: expect(result[:b]).to eql(x: {})

expected: {:x=>{}}
got: {:x=>nil}

(compared using eql?)

Diff:
@@ -1,2 +1,2 @@
-:x => {},
+:x => nil,
# ./spec/active_interaction/integration/hash_interaction_spec.rb:28:in `block (3 levels) in '
```

I'll comment on some other things inline