Sha256: 12a58f706a568f0377ea931309d21cb68816edb366000c5ec63a4648d2e21ab8
Contents?: true
Size: 745 Bytes
Versions: 1
Compression:
Stored size: 745 Bytes
Contents
require 'spec_helper' require 'dionysus/symbol/inquiry' describe Symbol do subject { :foo } describe "#[inquiry]?" do it "should pass-through without an ending '?'" do expect { subject.foo }.to raise_error NoMethodError, "undefined method `foo' for :foo:Symbol" end it "should return false anything with an ending '?'" do subject.blah?.should be_false subject.should_not respond_to(:blah?) 7.times do # 7 is a good prime-number :) method_name = Faker::Lorem.characters(4)+"?" subject.send(method_name).should be_false subject.should_not respond_to(method_name) end end it "should be true with it's own name'" do subject.foo?.should be_true end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
dionysus-2.2.0.0.pre1 | spec/lib/symbol/inquiry_spec.rb |