Rspecのskip

#### examplesを用いたskipの使用
>### Using skip with examples
#### Rspecはexampleがスキップしかつ実行しないことを指摘する色々な方法を提示する
>RSpec offers a number of ways to indicate that an example should be skipped and not executed.
>
#### 実施しない(doを入れないことで実行することなく保留される)
>### No implementation provided
>Given a file named “examplewithoutblock_spec.rb” with:
```rb
RSpec.describe "an example" do
  it "is a skipped example"
end
```
```
Pending: Not yet implemented
1 example, 0 failures, 0 passed, 1 pending
```
>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 “examplewithoutblock_spec.rb:2”.

#### skipを使ってスキップする
>### Skipping using skip
>Given a file named “skipped_spec.rb” with:
```rb
RSpec.describe "an example" do
  skip "is skipped" do
  end
end
```
```
Pending: No reason given
1 example, 0 failures, 0 passed, 1 pending
```
>When I run rspec skipped_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: (Failures listed here are expected and do not affect your suite's status)

  1) an example is skipped
     # No reason given
     # ./skipped_spec.rb:2
```
#### exampleの中でskipを使ってスキップする
>### Skipping using skip inside an example
Given a file named “skipped_spec.rb” with:
```rb
RSpec.describe "an example" do
  it "is skipped" do
    skip
  end
end
```
```
Pending: No reason given
1 example, 0 failures, 0 passed, 1 pending
```
>When I run rspec skipped_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: (Failures listed here are expected and do not affect your suite's status)

  1) an example is skipped
     # No reason given
     # ./skipped_spec.rb:2
```
#### 一時的に`specify``it`exampleの先頭に`x`につけることによってスキップする
>### Temporarily skipping by prefixing it, specify, or example with an x
>Given a file named “temporarilyskippedspec.rb” with:
```rb
RSpec.describe "an example" do
  xit "is skipped using xit" do
  end

  xspecify "is skipped using xspecify" do
  end

  xexample "is skipped using xexample" do
  end
end
```
>When I run rspec temporarily_skipped_spec.rb
>
>Then the exit status should be 0
>
>And the output should contain “3 examples, 0 failures, 3 pending”
>
>And the output should contain:
```
Pending: (Failures listed here are expected and do not affect your suite's status)

  1) an example is skipped using xit
     # Temporarily skipped with xit
     # ./temporarily_skipped_spec.rb:2

  2) an example is skipped using xspecify
     # Temporarily skipped with xspecify
     # ./temporarily_skipped_spec.rb:5

  3) an example is skipped using xexample
     # Temporarily skipped with xexample
     # ./temporarily_skipped_spec.rb:8
```
#### メタデータによってスキップする
>### Skipping using metadata
>Given a file named “skipped_spec.rb” with:
```rb
RSpec.describe "an example" do
  example "is skipped", :skip => true do
  end
end
```
>When I run rspec skipped_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: (Failures listed here are expected and do not affect your suite's status)

  1) an example is skipped
     # No reason given
     # ./skipped_spec.rb:2
```
#### 理由付きメタデータを使ってスキップする
>### Skipping using metadata with a reason
>Given a file named “skippedwithreason_spec.rb” with:
```rb
RSpec.describe "an example" do
  example "is skipped", :skip => "waiting for planets to align" do
    raise "this line is never executed"
  end
end
```
>When I run rspec skipped_with_reason_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: (Failures listed here are expected and do not affect your suite's status)

  1) an example is skipped
     # waiting for planets to align
     # ./skipped_with_reason_spec.rb:2
```
https://rspec.info/features/3-13/rspec-core/pending-and-skipped-examples/skipped-examples/