Skip to content

Instantly share code, notes, and snippets.

@easonhan007
Last active December 17, 2015 04:49
Show Gist options
  • Save easonhan007/5553245 to your computer and use it in GitHub Desktop.
Save easonhan007/5553245 to your computer and use it in GitHub Desktop.
rspec断言
a = true
a.should be_true
a = 1
a.should eq(1)
a.should eql(1)
a = 'abc'
a.should include('a')
a.should include('b')
a.should include('ab')
a.should respond_to(:split)
a.should be_instance_of(String)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment