spec/sakuramochi/relation_spec.rb in sakuramochi-0.5.1 vs spec/sakuramochi/relation_spec.rb in sakuramochi-0.5.2

- old
+ new

@@ -37,7 +37,15 @@ it { should have(2).items } it { subject.map(&:name).should_not be_match_all /うる|える/ } it { subject.map(&:name).should_not be_match_all /みおん/ } end + + describe 'with validation' do + before { @users = User.where([{:name_contains => nil}, :or, {:name_contains => 'りずむ'}]) } + subject { puts @users.to_sql; @users } + + it { subject.map(&:name).should_not be_match_all /あいら|みおん/ } + end + end end