Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Identify ruby code for syntax highlighting #180

Merged
merged 1 commit into from

3 participants

Patrick Van Stee alindeman Myron Marston
Patrick Van Stee

Fixes #178

alindeman
Collaborator

:shipit:

alindeman alindeman merged commit 5bb512a into from
Myron Marston

@vanstee -- thanks for doing this on all the repos! It'll make a big difference in how the cukes look on relish.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Oct 12, 2012
  1. Patrick Van Stee
This page is out of date. Refresh to see the latest.
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
8 features/built_in_matchers/be.feature
View
@@ -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 }
2  features/built_in_matchers/be_within.feature
View
@@ -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) }
2  features/built_in_matchers/cover.feature
View
@@ -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) }
4 features/built_in_matchers/end_with.feature
View
@@ -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 }
10 features/built_in_matchers/equality.feature
View
@@ -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
2  features/built_in_matchers/exist.feature
View
@@ -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
6 features/built_in_matchers/expect_change.feature
View
@@ -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
8 features/built_in_matchers/expect_error.feature
View
@@ -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" }.
4 features/built_in_matchers/have.feature
View
@@ -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(' ')
6 features/built_in_matchers/include.feature
View
@@ -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 } }
4 features/built_in_matchers/match.feature
View
@@ -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") }
6 features/built_in_matchers/operators.feature
View
@@ -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] }
10 features/built_in_matchers/predicates.feature
View
@@ -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?
4 features/built_in_matchers/respond_to.feature
View
@@ -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 }
2  features/built_in_matchers/satisfy.feature
View
@@ -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 } }
4 features/built_in_matchers/start_with.feature
View
@@ -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)}
6 features/built_in_matchers/throw_symbol.feature
View
@@ -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) }
4 features/built_in_matchers/types.feature
View
@@ -17,7 +17,7 @@ Feature: specify types of objects
Scenario: be_(a_)kind_of matcher
Given a file named "be_kind_of_matcher_spec.rb" with:
- """
+ """ruby
module MyModule; end
class Fixnum
@@ -70,7 +70,7 @@ Feature: specify types of objects
Scenario: be_(an_)instance_of matcher
Given a file named "be_instance_of_matcher_spec.rb" with:
- """
+ """ruby
module MyModule; end
class Fixnum
10 features/built_in_matchers/yield.feature
View
@@ -24,7 +24,7 @@ Feature: yield matchers
Background:
Given a file named "my_class.rb" with:
- """
+ """ruby
class MyClass
def self.yield_once_with(*args)
yield *args
@@ -41,7 +41,7 @@ Feature: yield matchers
Scenario: yield_control matcher
Given a file named "yield_control_spec.rb" with:
- """
+ """ruby
require './my_class'
describe "yield_control matcher" do
@@ -61,7 +61,7 @@ Feature: yield matchers
Scenario: yield_with_args matcher
Given a file named "yield_with_args_spec.rb" with:
- """
+ """ruby
require './my_class'
describe "yield_with_args matcher" do
@@ -94,7 +94,7 @@ Feature: yield matchers
Scenario: yield_with_no_args matcher
Given a file named "yield_with_no_args_spec.rb" with:
- """
+ """ruby
require './my_class'
describe "yield_with_no_args matcher" do
@@ -117,7 +117,7 @@ Feature: yield matchers
Scenario: yield_successive_args matcher
Given a file named "yield_successive_args_spec.rb" with:
- """
+ """ruby
def array
[1, 2, 3]
end
4 features/custom_matchers/access_running_example.feature
View
@@ -11,7 +11,7 @@ Feature: access running example
Scenario: call method defined on example from matcher
Given a file named "example_spec.rb" with:
- """
+ """ruby
RSpec::Matchers.define :bar do
match do |_|
foo == "foo"
@@ -33,7 +33,7 @@ Feature: access running example
Scenario: call method _not_ defined on example from matcher
Given a file named "example_spec.rb" with:
- """
+ """ruby
RSpec::Matchers.define :bar do
match do |_|
foo == "foo"
2  features/custom_matchers/define_diffable_matcher.feature
View
@@ -7,7 +7,7 @@ Feature: define diffable matcher
@wip
Scenario: define a diffable matcher
Given a file named "diffable_matcher_spec.rb" with:
- """
+ """ruby
RSpec::Matchers.define :be_just_like do |expected|
match do |actual|
actual == expected
24 features/custom_matchers/define_matcher.feature
View
@@ -6,7 +6,7 @@ Feature: define matcher
Scenario: define a matcher with default messages
Given a file named "matcher_with_default_message_spec.rb" with:
- """
+ """ruby
require 'rspec/expectations'
RSpec::Matchers.define :be_a_multiple_of do |expected|
@@ -48,7 +48,7 @@ Feature: define matcher
Scenario: overriding the failure_message_for_should
Given a file named "matcher_with_failure_message_spec.rb" with:
- """
+ """ruby
require 'rspec/expectations'
RSpec::Matchers.define :be_a_multiple_of do |expected|
@@ -72,7 +72,7 @@ Feature: define matcher
Scenario: overriding the failure_message_for_should_not
Given a file named "matcher_with_failure_for_message_spec.rb" with:
- """
+ """ruby
require 'rspec/expectations'
RSpec::Matchers.define :be_a_multiple_of do |expected|
@@ -96,7 +96,7 @@ Feature: define matcher
Scenario: overriding the description
Given a file named "matcher_overriding_description_spec.rb" with:
- """
+ """ruby
require 'rspec/expectations'
RSpec::Matchers.define :be_a_multiple_of do |expected|
@@ -124,7 +124,7 @@ Feature: define matcher
Scenario: with no args
Given a file named "matcher_with_no_args_spec.rb" with:
- """
+ """ruby
require 'rspec/expectations'
RSpec::Matchers.define :have_7_fingers do
@@ -148,7 +148,7 @@ Feature: define matcher
Scenario: with multiple args
Given a file named "matcher_with_multiple_args_spec.rb" with:
- """
+ """ruby
require 'rspec/expectations'
RSpec::Matchers.define :be_the_sum_of do |a,b,c,d|
@@ -168,7 +168,7 @@ Feature: define matcher
Scenario: with helper methods
Given a file named "matcher_with_internal_helper_spec.rb" with:
- """
+ """ruby
require 'rspec/expectations'
RSpec::Matchers.define :have_same_elements_as do |sample|
@@ -193,7 +193,7 @@ Feature: define matcher
Scenario: scoped in a module
Given a file named "scoped_matcher_spec.rb" with:
- """
+ """ruby
require 'rspec/expectations'
module MyHelpers
@@ -225,7 +225,7 @@ Feature: define matcher
Scenario: scoped in an example group
Given a file named "scoped_matcher_spec.rb" with:
- """
+ """ruby
require 'rspec/expectations'
describe "group with matcher" do
@@ -259,7 +259,7 @@ Feature: define matcher
Scenario: matcher with separate logic for should and should_not
Given a file named "matcher_with_separate_should_not_logic_spec.rb" with:
- """
+ """ruby
RSpec::Matchers.define :contain do |*expected|
match_for_should do |actual|
expected.all? { |e| actual.include?(e) }
@@ -287,7 +287,7 @@ Feature: define matcher
Scenario: use define_method to create a helper method with access to matcher params
Given a file named "define_method_spec.rb" with:
- """
+ """ruby
RSpec::Matchers.define :be_a_multiple_of do |expected|
define_method :is_multiple? do |actual|
actual % expected == 0
@@ -312,7 +312,7 @@ Feature: define matcher
Scenario: include a module with helper methods in the matcher
Given a file named "include_module_spec.rb" with:
- """
+ """ruby
module MatcherHelpers
def is_multiple?(actual, expected)
actual % expected == 0
2  features/custom_matchers/define_matcher_outside_rspec.feature
View
@@ -6,7 +6,7 @@ Feature: define matcher outside rspec
Scenario: define a matcher with default messages
Given a file named "test_multiples.rb" with:
- """
+ """ruby
require "rspec/expectations"
require "test/unit"
2  features/custom_matchers/define_matcher_with_fluent_interface.feature
View
@@ -4,7 +4,7 @@ Feature: define matcher with fluent interface
Scenario: chained method with argumetn
Given a file named "between_spec.rb" with:
- """
+ """ruby
RSpec::Matchers.define :be_bigger_than do |first|
match do |actual|
(actual > first) && (actual < @second)
2  features/customized_message.feature
View
@@ -6,7 +6,7 @@ Feature: customized message
Scenario: customize failure message
Given a file named "example_spec.rb" with:
- """
+ """ruby
describe Array do
context "when created with `new`" do
it "is empty" do
8 features/diffing.feature
View
@@ -4,7 +4,7 @@ Feature: diffing
Scenario: diff for a multiline string
Given a file named "example_spec.rb" with:
- """
+ """ruby
describe "a multiline string" do
it "is like another string" do
expected = <<-EXPECTED
@@ -34,7 +34,7 @@ Feature: diffing
Scenario: diff for a multiline string and a regexp
Given a file named "example_spec.rb" with:
- """
+ """ruby
describe "a multiline string" do
it "is like another string" do
expected = /expected/m
@@ -60,7 +60,7 @@ Feature: diffing
Scenario: no diff for a single line strings
Given a file named "example_spec.rb" with:
- """
+ """ruby
describe "a single line string" do
it "is like another string" do
expected = "this string"
@@ -74,7 +74,7 @@ Feature: diffing
Scenario: no diff for numbers
Given a file named "example_spec.rb" with:
- """
+ """ruby
describe "a number" do
it "is like another number" do
1.should eq(2)
4 features/implicit_docstrings.feature
View
@@ -6,7 +6,7 @@ Feature: implicit docstrings
Scenario: run passing examples
Given a file named "implicit_docstrings_spec.rb" with:
- """
+ """ruby
describe "Examples with no docstrings generate their own:" do
specify { 3.should be < 5 }
@@ -26,7 +26,7 @@ Feature: implicit docstrings
Scenario: run failing examples
Given a file named "failing_implicit_docstrings_spec.rb" with:
- """
+ """ruby
describe "Failing examples with no descriptions" do
# description is auto-generated as "should equal(5)" based on the last #should
2  features/test_frameworks/test_unit.feature
View
@@ -7,7 +7,7 @@ Feature: Test::Unit integration
Scenario: Basic Test::Unit usage
Given a file named "rspec_expectations_test.rb" with:
- """
+ """ruby
require 'test/unit'
require 'rspec/expectations'
Something went wrong with that request. Please try again.