Sha256: 302b292bd80db317fbd94089bddcfee11fe70debb65e4cf36be7d2ad3d95c57a
Contents?: true
Size: 1008 Bytes
Versions: 1
Compression:
Stored size: 1008 Bytes
Contents
# BaconExpect Bring [RSpec 3.0 expect syntax](https://www.relishapp.com/rspec/rspec-expectations/v/3-0/docs/built-in-matchers) to RubyMotion's MacBacon. ```ruby expect(view("Tap me")).not_to be_hidden ``` Expect syntax allows a cleaner implementation because it doesn't need to monkey-patch the Object class to install the `should` method. #Installation ``` gem install bacon-expect # or in Gemfile gem 'bacon-expect' ``` #Usage This gem ports most of the built-in matchers found in [RSpec 3.0](https://www.relishapp.com/rspec/rspec-expectations/v/3-0/docs/built-in-matchers) **A full list of matchers examples can be found in the [sample app specs.](spec_app/spec/matchers)** Examples: ```ruby expect(nil).to be_nil expect(true).not_to be_false expect("super").to end_with("per") expect{ 1/0 }.to raise_error(ZeroDivisionError) expect{ raise ArgumentError.new("with a message") }.to raise_error(ArgumentError, /message/) expect([1,2,3]).to have(3).items expect("string").to respond_to(:upcase) ```
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
bacon-expect-1.0.2 | README.md |