Sha256: 16b19610d19f02b77500cccbdd369174ccbe3eee6b089bf121869c52e8f43837
Contents?: true
Size: 901 Bytes
Versions: 2
Compression:
Stored size: 901 Bytes
Contents
require 'spec_helper' describe 'RSpec matchers' do specify 'see given string' do user = Bbq::Core::TestUser.new user.visit('/test_page') expect { expect(user).to see('Pink') }.to_not raise_error end specify 'unable to see given string' do user = Bbq::Core::TestUser.new user.visit('/test_page') expect { expect(user).to see('nothing to see') }.to raise_error(RSpec::Expectations::ExpectationNotMetError) end specify 'see given string within scope' do user = Bbq::Core::TestUser.new user.visit('/test_page') expect { expect(user).to see('Pink').within('#unicorns') }.to_not raise_error end specify 'unable to see given string within scope' do user = Bbq::Core::TestUser.new user.visit('/test_page') expect { expect(user).to see('Violet').within('#unicorns') }.to raise_error(RSpec::Expectations::ExpectationNotMetError) end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
bbq-rspec-0.4.0 | spec/rspec_matchers_spec.rb |
bbq-rspec-0.3.0 | spec/rspec_matchers_spec.rb |