To add a collaborator to this project you will need to use the Relish gem to add the collaborator via a terminal command. Soon you'll be able to also add collaborators here!
More about adding a collaboratorpending examples
RSpec offers four ways to indicate that an example is disabled pending
some action.
- Scenarios
-
- pending implementation
- pending any arbitary reason, with no block
- pending any arbitary reason, with a block that fails
- pending any arbitary reason, with a block that passes
- temporarily pending by changing "it" to "xit"
- example with no docstring and pending method using documentation formatter
- pending with no docstring using documentation formatter
- pending implementation
-
- Given
-
a file named "example_without_block_spec.rb" with:
describe "an example" do it "is a pending example" end
- When
- I run "rspec example_without_block_spec.rb"
- Then
- the exit status should be 0
- And
- the output should contain "1 example, 0 failures, 1 pending"
- And
- the output should contain "Not Yet Implemented"
- And
- the output should contain "example_without_block_spec.rb:2"
- pending any arbitary reason, with no block
-
- Given
-
a file named "pending_without_block_spec.rb" with:
describe "an example" do it "is implemented but waiting" do pending("something else getting finished") this_should_not_get_executed end end
- When
- I run "rspec pending_without_block_spec.rb"
- Then
- the exit status should be 0
- And
- the output should contain "1 example, 0 failures, 1 pending"
- And
-
the output should contain:
Pending: an example is implemented but waiting # something else getting finished # ./pending_without_block_spec.rb:2
- pending any arbitary reason, with a block that fails
-
- Given
-
a file named "pending_with_failing_block_spec.rb" with:
describe "an example" do it "is implemented but waiting" do pending("something else getting finished") do raise "this is the failure" end end end
- When
- I run "rspec pending_with_failing_block_spec.rb"
- Then
- the exit status should be 0
- And
- the output should contain "1 example, 0 failures, 1 pending"
- And
-
the output should contain:
Pending: an example is implemented but waiting # something else getting finished # ./pending_with_failing_block_spec.rb:2
- pending any arbitary reason, with a block that passes
-
- Given
-
a file named "pending_with_passing_block_spec.rb" with:
describe "an example" do it "is implemented but waiting" do pending("something else getting finished") do true.should be(true) end end end
- When
- I run "rspec pending_with_passing_block_spec.rb"
- Then
- the exit status should not be 0
- And
- the output should contain "1 example, 1 failure"
- And
- the output should contain "FIXED"
- And
- the output should contain "Expected pending 'something else getting finished' to fail. No Error was raised."
- And
- the output should contain "pending_with_passing_block_spec.rb:3"
- temporarily pending by changing "it" to "xit"
-
- Given
-
a file named "pending_with_xit_spec.rb" with:
describe "an example" do xit "is pending using xit" do true.should be(true) end end
- When
- I run "rspec pending_with_xit_spec.rb"
- Then
- the exit status should be 0
- And
- the output should contain "1 example, 0 failures, 1 pending"
- And
-
the output should contain:
Pending: an example is pending using xit
- example with no docstring and pending method using documentation formatter
-
- Given
-
a file named "pending_with_no_docstring_spec.rb" with:
describe "an example" do it "checks something" do (3+4).should == 7 end specify do pending end end
- When
- I run "rspec pending_with_no_docstring_spec.rb --format documentation"
- Then
- the exit status should be 0
- And
- the output should contain "2 examples, 0 failures, 1 pending"
- And
-
the output should contain:
an example checks something (PENDING: No reason given)
- pending with no docstring using documentation formatter
-
- Given
-
a file named "pending_with_no_docstring_spec.rb" with:
describe "an example" do it "checks something" do (3+4).should == 7 end pending do "string".reverse.should == "gnirts" end end
- When
- I run "rspec pending_with_no_docstring_spec.rb --format documentation"
- Then
- the exit status should be 0
- And
- the output should contain "2 examples, 0 failures, 1 pending"
- And
-
the output should contain:
an example checks something (PENDING: Not Yet Implemented)
Last published almost 7 years ago by dchelimsky.