Skip to content

Instantly share code, notes, and snippets.

@damncabbage
Forked from radar/foo.rb
Last active August 29, 2015 14:19
Show Gist options
  • Save damncabbage/20b878b09b5b0c5459f7 to your computer and use it in GitHub Desktop.
Save damncabbage/20b878b09b5b0c5459f7 to your computer and use it in GitHub Desktop.

Revisions

  1. damncabbage revised this gist Apr 22, 2015. 2 changed files with 26 additions and 4 deletions.
    2 changes: 1 addition & 1 deletion foo.rb
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,7 @@
    require 'rspec'
    require 'rspec/autorun'

    class Foo
    module Foo
    end

    RSpec.describe Foo do
    28 changes: 25 additions & 3 deletions output
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,26 @@
    .
    Foo
    tests (FAILED - 1)

    Finished in 0.00176 seconds (files took 0.16787 seconds to load)
    1 example, 0 failures
    Failures:

    1) Foo tests
    Failure/Error: expect(subject.class).to eq(Foo)

    expected: Foo
    got: Module

    (compared using ==)

    Diff:
    @@ -1,2 +1,2 @@
    -Foo
    +Module

    # ./foo.rb:9:in `block (2 levels) in <top (required)>'

    Finished in 0.00131 seconds
    1 example, 1 failure

    Failed examples:

    rspec ./foo.rb:8 # Foo tests
  2. @radar radar created this gist Apr 22, 2015.
    11 changes: 11 additions & 0 deletions foo.rb
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,11 @@
    require 'rspec'
    require 'rspec/autorun'

    class Foo
    end

    RSpec.describe Foo do
    it "tests" do
    expect(subject.class).to eq(Foo)
    end
    end
    4 changes: 4 additions & 0 deletions output
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,4 @@
    .

    Finished in 0.00176 seconds (files took 0.16787 seconds to load)
    1 example, 0 failures