Skip to content

Fix expectations for Ruby3 #3

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions 11_dictionary/dictionary_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,19 +30,19 @@
end

it 'can check whether a given keyword exists' do
@d.include?('fish').should be_false
@d.include?('fish').should be_falsey
end

it "doesn't cheat when checking whether a given keyword exists" do
@d.include?('fish').should be_false # if the method is empty, this test passes with nil returned
@d.include?('fish').should be_falsey # if the method is empty, this test passes with nil returned
@d.add('fish')
@d.include?('fish').should be_true # confirms that it actually checks
@d.include?('bird').should be_false # confirms not always returning true after add
@d.include?('fish').should be_truthy # confirms that it actually checks
@d.include?('bird').should be_falsey # confirms not always returning true after add
end

it "doesn't include a prefix that wasn't added as a word in and of itself" do
@d.add('fish')
@d.include?('fi').should be_false
@d.include?('fi').should be_falsey
end

it "doesn't find a word in empty dictionary" do
Expand Down