Permalink
Browse files

Identify ruby code for syntax highlighting

Fixes #178
  • Loading branch information...
1 parent 2f1595f commit 733e5d87670f55f3ae571127acea4897e06261d9 @vanstee committed Oct 12, 2012
Showing with 76 additions and 76 deletions.
  1. +4 −4 features/built_in_matchers/be.feature
  2. +1 −1 features/built_in_matchers/be_within.feature
  3. +1 −1 features/built_in_matchers/cover.feature
  4. +2 −2 features/built_in_matchers/end_with.feature
  5. +5 −5 features/built_in_matchers/equality.feature
  6. +1 −1 features/built_in_matchers/exist.feature
  7. +3 −3 features/built_in_matchers/expect_change.feature
  8. +4 −4 features/built_in_matchers/expect_error.feature
  9. +2 −2 features/built_in_matchers/have.feature
  10. +3 −3 features/built_in_matchers/include.feature
  11. +2 −2 features/built_in_matchers/match.feature
  12. +3 −3 features/built_in_matchers/operators.feature
  13. +5 −5 features/built_in_matchers/predicates.feature
  14. +2 −2 features/built_in_matchers/respond_to.feature
  15. +1 −1 features/built_in_matchers/satisfy.feature
  16. +2 −2 features/built_in_matchers/start_with.feature
  17. +3 −3 features/built_in_matchers/throw_symbol.feature
  18. +2 −2 features/built_in_matchers/types.feature
  19. +5 −5 features/built_in_matchers/yield.feature
  20. +2 −2 features/custom_matchers/access_running_example.feature
  21. +1 −1 features/custom_matchers/define_diffable_matcher.feature
  22. +12 −12 features/custom_matchers/define_matcher.feature
  23. +1 −1 features/custom_matchers/define_matcher_outside_rspec.feature
  24. +1 −1 features/custom_matchers/define_matcher_with_fluent_interface.feature
  25. +1 −1 features/customized_message.feature
  26. +4 −4 features/diffing.feature
  27. +2 −2 features/implicit_docstrings.feature
  28. +1 −1 features/test_frameworks/test_unit.feature
@@ -9,7 +9,7 @@ Feature: "be" matchers
Scenario: be_true matcher
Given a file named "be_true_spec.rb" with:
- """
+ """ruby
describe "be_true matcher" do
specify { true.should be_true }
specify { 7.should be_true }
@@ -55,7 +55,7 @@ Feature: "be" matchers
Scenario: be_false matcher
Given a file named "be_false_spec.rb" with:
- """
+ """ruby
describe "be_false matcher" do
specify { nil.should be_false }
specify { false.should be_false }
@@ -101,7 +101,7 @@ Feature: "be" matchers
Scenario: be_nil matcher
Given a file named "be_nil_spec.rb" with:
- """
+ """ruby
describe "be_nil matcher" do
specify { nil.should be_nil }
specify { false.should_not be_nil }
@@ -147,7 +147,7 @@ Feature: "be" matchers
Scenario: be matcher
Given a file named "be_spec.rb" with:
- """
+ """ruby
describe "be_matcher" do
specify { true.should be }
specify { 7.should be }
@@ -20,7 +20,7 @@ Feature: be_within matcher
Scenario: basic usage
Given a file named "be_within_matcher_spec.rb" with:
- """
+ """ruby
describe 27.5 do
it { should be_within(0.5).of(27.9) }
it { should be_within(0.5).of(28.0) }
@@ -11,7 +11,7 @@ Feature: cover matcher
Scenario: range usage
Given a file named "range_cover_matcher_spec.rb" with:
- """
+ """ruby
describe (1..10) do
it { should cover(4) }
it { should cover(6) }
@@ -9,7 +9,7 @@ Feature: end_with matcher
Scenario: string usage
Given a file named "example_spec.rb" with:
- """
+ """ruby
describe "this string" do
it { should end_with "string" }
it { should_not end_with "stringy" }
@@ -27,7 +27,7 @@ Feature: end_with matcher
Scenario: array usage
Given a file named "example_spec.rb" with:
- """
+ """ruby
describe [0, 1, 2, 3, 4] do
it { should end_with 4 }
it { should end_with 3, 4 }
@@ -26,7 +26,7 @@ Feature: equality matchers
Scenario: compare using eq (==)
Given a file named "compare_using_eq.rb" with:
- """
+ """ruby
require 'spec_helper'
describe "a string" do
@@ -50,7 +50,7 @@ Feature: equality matchers
Scenario: compare using ==
Given a file named "compare_using_==.rb" with:
- """
+ """ruby
require 'spec_helper'
describe "a string" do
@@ -74,7 +74,7 @@ Feature: equality matchers
Scenario: compare using eql (eql?)
Given a file named "compare_using_eql.rb" with:
- """
+ """ruby
require 'spec_helper'
describe "an integer" do
@@ -97,7 +97,7 @@ Feature: equality matchers
Scenario: compare using equal (equal?)
Given a file named "compare_using_equal.rb" with:
- """
+ """ruby
require 'spec_helper'
describe "a string" do
@@ -121,7 +121,7 @@ Feature: equality matchers
Scenario: compare using be (equal?)
Given a file named "compare_using_be.rb" with:
- """
+ """ruby
require 'spec_helper'
describe "a string" do
@@ -7,7 +7,7 @@ Feature: exist matcher
Scenario: basic usage
Given a file named "exist_matcher_spec.rb" with:
- """
+ """ruby
class Planet
attr_reader :name
@@ -4,7 +4,7 @@ Feature: expect change
Background:
Given a file named "lib/counter.rb" with:
- """
+ """ruby
class Counter
class << self
def increment
@@ -21,7 +21,7 @@ Feature: expect change
Scenario: expect change
Given a file named "spec/example_spec.rb" with:
- """
+ """ruby
require "counter"
describe Counter, "#increment" do
@@ -41,7 +41,7 @@ Feature: expect change
Scenario: expect no change
Given a file named "spec/example_spec.rb" with:
- """
+ """ruby
require "counter"
describe Counter, "#increment" do
@@ -48,7 +48,7 @@ Feature: raise_error matcher
Scenario: match message with a string
Given a file named "example_spec.rb" with:
- """
+ """ruby
describe "matching error message with string" do
it "matches the error message" do
expect { raise StandardError, 'this message exactly'}.
@@ -61,7 +61,7 @@ Feature: raise_error matcher
Scenario: match message with a regexp
Given a file named "example_spec.rb" with:
- """
+ """ruby
describe "matching error message with regex" do
it "matches the error message" do
expect { raise StandardError, "my message" }.
@@ -74,7 +74,7 @@ Feature: raise_error matcher
Scenario: match type + message with string
Given a file named "example_spec.rb" with:
- """
+ """ruby
describe "matching error message with string" do
it "matches the error message" do
expect { raise StandardError, 'this message exactly'}.
@@ -87,7 +87,7 @@ Feature: raise_error matcher
Scenario: match type + message with regexp
Given a file named "example_spec.rb" with:
- """
+ """ruby
describe "matching error message with regex" do
it "matches the error message" do
expect { raise StandardError, "my message" }.
@@ -25,7 +25,7 @@ Feature: have(n).items matcher
Scenario: have(x).items on a collection
Given a file named "have_items_spec.rb" with:
- """
+ """ruby
describe [1, 2, 3] do
it { should have(3).items }
it { should_not have(2).items }
@@ -61,7 +61,7 @@ Feature: have(n).items matcher
Scenario: have(x).words on a String when String#words is defined
Given a file named "have_words_spec.rb" with:
- """
+ """ruby
class String
def words
split(' ')
@@ -25,7 +25,7 @@ Feature: include matcher
Scenario: array usage
Given a file named "array_include_matcher_spec.rb" with:
- """
+ """ruby
describe [1, 3, 7] do
it { should include(1) }
it { should include(3) }
@@ -60,7 +60,7 @@ Feature: include matcher
Scenario: string usage
Given a file named "string_include_matcher_spec.rb" with:
- """
+ """ruby
describe "a string" do
it { should include("str") }
it { should include("a", "str", "ng") }
@@ -84,7 +84,7 @@ Feature: include matcher
Scenario: hash usage
Given a file named "hash_include_matcher_spec.rb" with:
- """
+ """ruby
describe Hash do
subject { { :a => 7, :b => 5 } }
@@ -14,7 +14,7 @@ Feature: match matcher
Scenario: string usage
Given a file named "string_match_spec.rb" with:
- """
+ """ruby
describe "a string" do
it { should match(/str/) }
it { should_not match(/foo/) }
@@ -32,7 +32,7 @@ Feature: match matcher
Scenario: regular expression usage
Given a file named "regexp_match_spec.rb" with:
- """
+ """ruby
describe /foo/ do
it { should match("food") }
it { should_not match("drinks") }
@@ -26,7 +26,7 @@ Feature: operator matchers
Scenario: numeric operator matchers
Given a file named "numeric_operator_matchers_spec.rb" with:
- """
+ """ruby
describe 18 do
it { should == 18 }
it { should be < 20 }
@@ -87,7 +87,7 @@ Feature: operator matchers
Scenario: string operator matchers
Given a file named "string_operator_matchers_spec.rb" with:
- """
+ """ruby
describe "Strawberry" do
it { should == "Strawberry" }
it { should be < "Tomato" }
@@ -178,7 +178,7 @@ Feature: operator matchers
Scenario: array operator matchers
Given a file named "array_operator_matchers_spec.rb" with:
- """
+ """ruby
describe [1, 2, 3] do
it { should == [1, 2, 3] }
it { should_not == [1, 3, 2] }
@@ -38,7 +38,7 @@ Feature: predicate matchers
Scenario: should be_zero (based on Fixnum#zero?)
Given a file named "should_be_zero_spec.rb" with:
- """
+ """ruby
describe 0 do
it { should be_zero }
end
@@ -53,7 +53,7 @@ Feature: predicate matchers
Scenario: should_not be_empty (based on Array#empty?)
Given a file named "should_not_be_empty_spec.rb" with:
- """
+ """ruby
describe [1, 2, 3] do
it { should_not be_empty }
end
@@ -68,7 +68,7 @@ Feature: predicate matchers
Scenario: should have_key (based on Hash#has_key?)
Given a file named "should_have_key_spec.rb" with:
- """
+ """ruby
describe Hash do
subject { { :foo => 7 } }
it { should have_key(:foo) }
@@ -81,7 +81,7 @@ Feature: predicate matchers
Scenario: should_not have_all_string_keys (based on custom #has_all_string_keys? method)
Given a file named "should_not_have_all_string_keys_spec.rb" with:
- """
+ """ruby
class Hash
def has_all_string_keys?
keys.all? { |k| String === k }
@@ -106,7 +106,7 @@ Feature: predicate matchers
Scenario: matcher arguments are passed on to the predicate method
Given a file named "predicate_matcher_argument_spec.rb" with:
- """
+ """ruby
class Fixnum
def multiple_of?(x)
(self % x).zero?
@@ -22,7 +22,7 @@ Feature: respond_to matcher
Scenario: basic usage
Given a file named "respond_to_matcher_spec.rb" with:
- """
+ """ruby
describe "a string" do
it { should respond_to(:length) }
it { should respond_to(:hash, :class, :to_s) }
@@ -53,7 +53,7 @@ Feature: respond_to matcher
Scenario: specify arguments
Given a file named "respond_to_matcher_argument_checking_spec.rb" with:
- """
+ """ruby
describe 7 do
it { should respond_to(:zero?).with(0).arguments }
it { should_not respond_to(:zero?).with(1).argument }
@@ -13,7 +13,7 @@ Feature: satisfy matcher
Scenario: basic usage
Given a file named "satisfy_matcher_spec.rb" with:
- """
+ """ruby
describe 10 do
it { should satisfy { |v| v > 5 } }
it { should_not satisfy { |v| v > 15 } }
@@ -9,7 +9,7 @@ Feature: start_with matcher
Scenario: with a string
Given a file named "example_spec.rb" with:
- """
+ """ruby
describe "this string" do
it { should start_with "this" }
it { should_not start_with "that" }
@@ -27,7 +27,7 @@ Feature: start_with matcher
Scenario: with an array
Given a file named "example_spec.rb" with:
- """
+ """ruby
describe [0, 1, 2, 3, 4] do
it { should start_with 0 }
it { should start_with(0, 1)}
@@ -16,7 +16,7 @@ Feature: throw_symbol matcher
Scenario: basic usage
Given a file named "throw_symbol_matcher_spec.rb" with:
- """
+ """ruby
describe "throw" do
specify { expect { throw :foo }.to throw_symbol }
specify { expect { throw :bar, 7 }.to throw_symbol }
@@ -37,7 +37,7 @@ Feature: throw_symbol matcher
Scenario: specify thrown symbol
Given a file named "throw_symbol_matcher_spec.rb" with:
- """
+ """ruby
describe "throw symbol" do
specify { expect { throw :foo }.to throw_symbol(:foo) }
specify { expect { throw :foo, 7 }.to throw_symbol(:foo) }
@@ -61,7 +61,7 @@ Feature: throw_symbol matcher
Scenario: specify thrown symbol and argument
Given a file named "throw_symbol_argument_matcher_spec.rb" with:
- """
+ """ruby
describe "throw symbol with argument" do
specify { expect { throw :foo, 7 }.to throw_symbol(:foo, 7) }
specify { expect { throw :foo, 8 }.to_not throw_symbol(:foo, 7) }
Oops, something went wrong.

0 comments on commit 733e5d8

Please sign in to comment.