spec/unit/validator/valid_predicate_spec.rb in yema-0.0.1 vs spec/unit/validator/valid_predicate_spec.rb in yema-0.0.2
- old
+ new
@@ -2,12 +2,12 @@
describe Yema::Validator, "#valid?" do
subject { validator.valid? }
- let(:validator) { described_class.new(rule, resource) }
- let(:rule) { mock('required_rule', attribute_name: :foo) }
+ let(:validator) { described_class.new(resource, rule) }
let(:resource) { mock('resource', foo: value) }
+ let(:rule) { mock('required_rule', attribute_name: :foo) }
before do
resource.should_receive(:foo).and_return(value)
end