Module: Cuprum::RSpec::Matchers
- Defined in:
- lib/cuprum/rspec/be_a_result.rb,
lib/cuprum/rspec/be_callable.rb
Overview
rubocop:disable Style/Documentation
Instance Method Summary collapse
-
#be_a_failing_result(expected_class = nil) ⇒ Cuprum::RSpec::BeAResultMatcher
Asserts that the object is a result with status: :failure.
-
#be_a_passing_result(expected_class = nil) ⇒ Cuprum::RSpec::BeAResultMatcher
Asserts that the object is a Cuprum::Result with status: :success.
-
#be_a_result(expected_class = nil) ⇒ Cuprum::RSpec::BeAResultMatcher
Asserts that the object is a Cuprum::Result.
-
#be_callable ⇒ RSpec::Matchers::BuiltIn::RespondTo
Asserts that the command defines a :process method.
Instance Method Details
#be_a_failing_result(expected_class = nil) ⇒ Cuprum::RSpec::BeAResultMatcher
Asserts that the object is a result with status: :failure.
13 14 15 |
# File 'lib/cuprum/rspec/be_a_result.rb', line 13 def be_a_failing_result(expected_class = nil) be_a_result(expected_class).with_status(:failure) end |
#be_a_passing_result(expected_class = nil) ⇒ Cuprum::RSpec::BeAResultMatcher
Asserts that the object is a Cuprum::Result with status: :success.
23 24 25 |
# File 'lib/cuprum/rspec/be_a_result.rb', line 23 def be_a_passing_result(expected_class = nil) be_a_result(expected_class).with_status(:success).and_error(nil) end |
#be_a_result(expected_class = nil) ⇒ Cuprum::RSpec::BeAResultMatcher
Asserts that the object is a Cuprum::Result.
30 31 32 |
# File 'lib/cuprum/rspec/be_a_result.rb', line 30 def be_a_result(expected_class = nil) Cuprum::RSpec::BeAResultMatcher.new(expected_class) end |
#be_callable ⇒ RSpec::Matchers::BuiltIn::RespondTo
Asserts that the command defines a :process method.
10 11 12 |
# File 'lib/cuprum/rspec/be_callable.rb', line 10 def be_callable respond_to(:process, true) end |