0.0
No commit activity in last 3 years
No release in over 3 years
RSpec's expect syntax in MacBacon
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.3
>= 0
 Project Readme

MotionExpect Build Status Code Climate

Bring RSpec 3.0 expect syntax to RubyMotion's MacBacon.

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 motion-expect

# or in Gemfile
gem 'motion-expect'

Usage

This gem ports most of the built-in matchers found in RSpec 3.0

A full list of matchers examples can be found in the sample app specs.

Examples:

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)