Last rspec fix brought to you by jhass

This commit is contained in:
khall 2014-08-25 18:38:19 -07:00
parent 087dbd4acf
commit b7c68031fa
2 changed files with 4 additions and 3 deletions

View file

@ -164,7 +164,7 @@ end
Then /^the "([^"]*)" checkbox(?: within "([^"]*)")? should not be checked$/ do |label, selector|
with_scope(selector) do
field_checked = find_field(label)['checked']
field_checked.should be false
field_checked.should be_falsey
end
end

View file

@ -52,8 +52,9 @@ describe StatusMessage, :type => :model do
describe '.user_tag_stream' do
it 'returns tag stream thats owned or visible by' do
expect(StatusMessage).to receive(:owned_or_visible_by_user).with(bob).and_return(StatusMessage)
expect(StatusMessage).to receive(:tag_stream).with([@tag_id])
relation = double
expect(StatusMessage).to receive(:owned_or_visible_by_user).with(bob).and_return(relation)
expect(relation).to receive(:tag_stream).with([@tag_id])
StatusMessage.user_tag_stream(bob, [@tag_id])
end