Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #192 from vanstee/ruby_file_doc_strings

Identify ruby code for syntax highlighting
  • Loading branch information...
commit df822fe16e32d235e0072bbf86357278f13a2e0a 2 parents 3d9d860 + 80975a4
@alindeman alindeman authored
View
4 features/argument_matchers/explicit.feature
@@ -4,7 +4,7 @@ Feature: explicit arguments
Scenario: explicit arguments
Given a file named "stub_explicit_args_spec.rb" with:
- """
+ """ruby
describe "stubbed explicit arguments" do
it "works on stubs" do
object = Object.new
@@ -32,7 +32,7 @@ Feature: explicit arguments
Scenario: explicit arguments with multiple arities
Given a file named "stub_multiple_explicit_args_spec.rb" with:
- """
+ """ruby
describe "stubbed multiple explicit arguments" do
it "works on stubs" do
object = Object.new
View
8 features/argument_matchers/general_matchers.feature
@@ -7,7 +7,7 @@ Feature: General matchers
Scenario: anything argument matcher
Given a file named "stub_anything_args_spec.rb" with:
- """
+ """ruby
describe "stubbed anything() args spec" do
it "works" do
object = Object.new
@@ -25,7 +25,7 @@ Feature: General matchers
Scenario: any_args argument matcher
Given a file named "stub_any_args_spec.rb" with:
- """
+ """ruby
describe "stubbed any_args() args spec" do
it "works" do
object = Object.new
@@ -44,7 +44,7 @@ Feature: General matchers
Scenario: no_args argument matcher
Given a file named "stub_no_args_spec.rb" with:
- """
+ """ruby
describe "stubbed no_args() args spec" do
it "works for no args" do
object = Object.new
@@ -65,7 +65,7 @@ Feature: General matchers
Scenario: no_args argument matcher for expectations
Given a file named "stub_no_args_expectations_spec.rb" with:
- """
+ """ruby
describe "stubbed no_args() args spec for expectations" do
it "works for no args" do
object = Object.new
View
2  features/argument_matchers/type_matchers.feature
@@ -6,7 +6,7 @@ Feature: stub with argument constraints
Scenario: an_instance_of argument matcher
Given a file named "stub_an_instance_of_args_spec.rb" with:
- """
+ """ruby
describe "stubbed an_instance_of() args spec" do
it "works" do
object = Object.new
View
2  features/message_expectations/any_instance.feature
@@ -7,7 +7,7 @@ Feature: expect a message on any instance of a class
Scenario: expect a message on any instance of a class
Given a file named "example_spec.rb" with:
- """
+ """ruby
describe "any_instance.should_receive" do
it "verifies that one instance of the class receives the message" do
Object.any_instance.should_receive(:foo).and_return(:return_value)
View
10 features/message_expectations/expect_message.feature
@@ -5,7 +5,7 @@ Feature: expect a message
Scenario: expect a message
Given a file named "spec/account_spec.rb" with:
- """
+ """ruby
require "account"
describe Account do
@@ -23,7 +23,7 @@ Feature: expect a message
end
"""
And a file named "lib/account.rb" with:
- """
+ """ruby
class Account
attr_accessor :logger
@@ -37,7 +37,7 @@ Feature: expect a message
Scenario: expect a message with an argument
Given a file named "spec/account_spec.rb" with:
- """
+ """ruby
require "account"
describe Account do
@@ -55,7 +55,7 @@ Feature: expect a message
end
"""
And a file named "lib/account.rb" with:
- """
+ """ruby
class Account
attr_accessor :logger
@@ -69,7 +69,7 @@ Feature: expect a message
Scenario: provide a return value
Given a file named "message_expectation_spec.rb" with:
- """
+ """ruby
describe "a message expectation" do
context "with a return value" do
context "specified in a block" do
View
14 features/message_expectations/receive_counts.feature
@@ -2,7 +2,7 @@ Feature: receive counts
Scenario: expect a message once
Given a file named "spec/account_spec.rb" with:
- """
+ """ruby
class Account
attr_accessor :logger
@@ -30,7 +30,7 @@ Feature: receive counts
Scenario: expect a message twice
Given a file named "spec/account_spec.rb" with:
- """
+ """ruby
class Account
attr_accessor :logger
@@ -59,7 +59,7 @@ Feature: receive counts
Scenario: expect a message 3 times
Given a file named "spec/account_spec.rb" with:
- """
+ """ruby
class Account
attr_accessor :logger
@@ -89,7 +89,7 @@ Feature: receive counts
Scenario: expect a message at least (:once)
Given a file named "spec/account_spec.rb" with:
- """
+ """ruby
class Account
attr_accessor :logger
@@ -118,7 +118,7 @@ Feature: receive counts
Scenario: expect a message at least (n) times
Given a file named "spec/account_spec.rb" with:
- """
+ """ruby
class Account
attr_accessor :logger
@@ -151,7 +151,7 @@ Feature: receive counts
Scenario: expect a message at most (:once)
Given a file named "spec/account_spec.rb" with:
- """
+ """ruby
class Account
attr_accessor :logger
@@ -181,7 +181,7 @@ Feature: receive counts
Scenario: expect a message at most (n) times
Given a file named "spec/account_spec.rb" with:
- """
+ """ruby
class Account
attr_accessor :logger
View
6 features/message_expectations/warn_when_expectation_is_set_on_nil.feature
@@ -2,7 +2,7 @@ Feature: warn when expectation is set on nil
Scenario: nil instance variable
Given a file named "example_spec.rb" with:
- """
+ """ruby
RSpec.configure {|c| c.mock_with :rspec}
describe "something" do
it "does something" do
@@ -16,7 +16,7 @@ Feature: warn when expectation is set on nil
Scenario: allow
Given a file named "example_spec.rb" with:
- """
+ """ruby
RSpec.configure {|c| c.mock_with :rspec}
describe "something" do
it "does something" do
@@ -31,7 +31,7 @@ Feature: warn when expectation is set on nil
Scenario: allow in one example, but not on another
Given a file named "example_spec.rb" with:
- """
+ """ruby
RSpec.configure {|c| c.mock_with :rspec}
describe "something" do
it "does something (foo)" do
View
13 features/method_stubs/any_instance.feature
@@ -8,7 +8,7 @@ Feature: stub on any instance of a class
Scenario: any_instance stub with a single return value
Given a file named "example_spec.rb" with:
- """
+ """ruby
describe "any_instance.stub" do
it "returns the specified value on any instance of the class" do
Object.any_instance.stub(:foo).and_return(:return_value)
@@ -23,7 +23,7 @@ Feature: stub on any instance of a class
Scenario: any_instance stub with a hash
Given a file named "example_spec.rb" with:
- """
+ """ruby
describe "any_instance.stub" do
context "with a hash" do
it "returns the hash values on any instance of the class" do
@@ -41,7 +41,7 @@ Feature: stub on any instance of a class
Scenario: any_instance stub with specific arguments matchers
Given a file named "example_spec.rb" with:
- """
+ """ruby
describe "any_instance.stub" do
context "with arguments" do
it "returns the stubbed value when arguments match" do
@@ -60,7 +60,7 @@ Feature: stub on any instance of a class
Scenario: any_instance unstub
Given a file named "example_spec.rb" with:
- """
+ """ruby
describe "any_instance.unstub" do
it "unstubs a stubbed method" do
class Object
@@ -81,7 +81,7 @@ Feature: stub on any instance of a class
Scenario: any_instance unstub
Given a file named "example_spec.rb" with:
- """
+ """ruby
describe "any_instance.unstub" do
context "with both an expectation and a stub already set" do
it "only removes the stub" do
@@ -104,7 +104,7 @@ Feature: stub on any instance of a class
Scenario: stub a chain of methods an any instance
Given a file named "stub_chain_spec.rb" with:
- """
+ """ruby
describe "stubbing a chain of methods" do
context "given symbols representing methods" do
it "returns the correct value" do
@@ -130,4 +130,3 @@ Feature: stub on any instance of a class
"""
When I run `rspec stub_chain_spec.rb`
Then the examples should all pass
-
View
2  features/method_stubs/as_null_object.feature
@@ -8,7 +8,7 @@ Feature: as_null_object
Scenario: double acting as_null_object
Given a file named "as_null_object_spec.rb" with:
- """
+ """ruby
describe "a double with as_null_object called" do
let(:null_object) { double('null object').as_null_object }
View
4 features/method_stubs/simple_return_value.feature
@@ -6,7 +6,7 @@ Feature: stub with a simple return value
Scenario: stub with no return value
Given a file named "example_spec.rb" with:
- """
+ """ruby
describe "a stub with no return value specified" do
let(:collaborator) { double("collaborator") }
@@ -21,7 +21,7 @@ Feature: stub with a simple return value
Scenario: stubs with return values
Given a file named "example_spec.rb" with:
- """
+ """ruby
describe "a stub with a return value" do
context "specified in a block" do
it "returns the specified value" do
View
2  features/method_stubs/stub_chain.feature
@@ -21,7 +21,7 @@ Feature: stub a chain of methods
Scenario: stub a chain of methods
Given a file named "stub_chain_spec.rb" with:
- """
+ """ruby
describe "stubbing a chain of methods" do
subject { Object.new }
View
2  features/method_stubs/stub_implementation.feature
@@ -5,7 +5,7 @@ Feature: stub with substitute implementation
Scenario: stub implementation
Given a file named "stub_implementation_spec.rb" with:
- """
+ """ruby
describe "a stubbed implementation" do
it "works" do
object = Object.new
View
2  features/method_stubs/to_ary.feature
@@ -14,7 +14,7 @@ Feature: double handling to_ary
Scenario: double receiving to_ary
Given a file named "example.rb" with:
- """
+ """ruby
describe "#to_ary" do
shared_examples "to_ary" do
it "raises a NoMethodError" do
View
6 features/outside_rspec/configuration.feature
@@ -25,7 +25,7 @@ Feature: configure any test framework to use rspec-mocks
Scenario: RSpec::Mocks::setup(object) adds double, mock, and stub methods to the submitted object
Given a file named "foo.rb" with:
- """
+ """ruby
require 'rspec/mocks'
class CodeExample
@@ -48,7 +48,7 @@ Feature: configure any test framework to use rspec-mocks
Scenario: RSpec::Mocks::setup(anything) adds methods to Object
Given a file named "foo.rb" with:
- """
+ """ruby
require 'rspec/mocks'
RSpec::Mocks::setup(Object.new)
@@ -66,7 +66,7 @@ Feature: configure any test framework to use rspec-mocks
Scenario: require "rspec/mocks" does not add methods to Object
Given a file named "foo.rb" with:
- """
+ """ruby
require 'rspec/mocks'
obj = Object.new
View
4 features/outside_rspec/standalone.feature
@@ -6,7 +6,7 @@ Feature: standalone
Scenario: method stub outside rspec
Given a file named "example.rb" with:
- """
+ """ruby
require "rspec/mocks/standalone"
greeter = double("greeter")
@@ -18,7 +18,7 @@ Feature: standalone
Scenario: message expectation outside rspec
Given a file named "example.rb" with:
- """
+ """ruby
require "rspec/mocks/standalone"
greeter = double("greeter")
Please sign in to comment.
Something went wrong with that request. Please try again.