Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

words

  • Loading branch information...
commit c2c45f2190c6132302135426aef18dcd5bdf014a 1 parent 093a3f1
@dchelimsky dchelimsky authored
View
13 README.markdown
@@ -3,17 +3,14 @@
rspec-expectations adds `should` and `should_not` to every object and includes
RSpec::Matchers, a library of standard matchers.
-rspec-expectations is currently in alpha release. While you are welcome to
-track, fork, explore, etc, we're too early in the process to start fielding
-pull requests and or issues from outside the core development team, so please
-don't waste your time until this notice changes.
+# Matchers
-## Install
+Matchers are objects used to compose expectations:
- [sudo] gem install rspec --prerelease
-
-This will install rspec, rspec-core, rspec-expectations and rspec-mocks.
+ result.should eq("this value")
+In that example, `eq("this value")` returns a `Matcher` object that
+compares the actual `result` to the expected `"this value"`.
#### Also see
View
13 lib/rspec/matchers.rb
@@ -1,6 +1,7 @@
module RSpec
- # RSpec ships with a number of useful Expression Matchers. An Expression Matcher
- # is any object that responds to the following methods:
+ # rspec-expecations provides a number of useful Matchers we use to compose
+ # expectations. A Matcher is any object that responds to the following
+ # methods:
#
# matches?(actual)
# failure_message_for_should
@@ -11,14 +12,6 @@ module RSpec
# failure_message_for_should_not
# description #optional
#
- # These methods are from older versions of the protocol. They are still supported,
- # but are not recommended:
- #
- # failure_message (use failure_message_for_should instead)
- # negative_failure_message (use failure_message_for_should_not instead)
- #
- # See RSpec::Expectations to learn how to use these as Expectation Matchers.
- #
# == Predicates
#
# In addition to those Expression Matchers that are defined explicitly, RSpec will
View
4 lib/rspec/matchers/include.rb
@@ -30,11 +30,11 @@ def include(*expected)
end
end
- def comparing_hash_keys?(actual, expected)
+ def comparing_hash_keys?(actual, expected) # :nodoc:
actual.is_a?(Hash) && !expected.is_a?(Hash)
end
- def comparing_hash_values?(actual, expected)
+ def comparing_hash_values?(actual, expected) # :nodoc:
actual.is_a?(Hash) && expected.is_a?(Hash)
end
View
6 rspec-expectations.gemspec
@@ -9,7 +9,7 @@ Gem::Specification.new do |s|
s.required_rubygems_version = Gem::Requirement.new("> 1.3.1") if s.respond_to? :required_rubygems_version=
s.authors = ["David Chelimsky", "Chad Humphries"]
- s.date = %q{2010-06-02}
+ s.date = %q{2010-06-04}
s.description = %q{rspec expectations (should[_not] and matchers)}
s.email = %q{dchelimsky@gmail.com;chad.humphries@gmail.com}
s.extra_rdoc_files = [
@@ -121,7 +121,7 @@ Gem::Specification.new do |s|
s.rdoc_options = ["--charset=UTF-8"]
s.require_paths = ["lib"]
s.rubyforge_project = %q{rspec}
- s.rubygems_version = %q{1.3.6}
+ s.rubygems_version = %q{1.3.7}
s.summary = %q{rspec-expectations-2.0.0.beta.10}
s.test_files = [
"spec/rspec/expectations/differ_spec.rb",
@@ -161,7 +161,7 @@ Gem::Specification.new do |s|
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
s.specification_version = 3
- if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
s.add_runtime_dependency(%q<diff-lcs>, [">= 1.1.2"])
s.add_development_dependency(%q<cucumber>, [">= 0.6.2"])
s.add_development_dependency(%q<aruba>, [">= 0.1.1"])
Please sign in to comment.
Something went wrong with that request. Please try again.