class Bacon::Context

Public Instance Methods

fit(description, &block) click to toggle source

Add support for running only focused specs

@note The implementation is a hack because bacon evaluates Context#it

immediately. Therefore this method is intended to be **temporary**.

@example

module BaconFocusedMode; end

describe “A Context” do

it "will *not* runt" do; end
fit "will runt" do; end

end

# File lib/pretty_bacon/context.rb, line 27
def fit(description, &block)
  origina_it(description, &block)
end
it(description, &block) click to toggle source
# File lib/pretty_bacon/context.rb, line 34
def it(description, &block)
  unless defined?(::BaconFocusedMode)
    origina_it(description, &block)
  end
end
Also aliased as: origina_it
origina_it(description, &block)

Add support for focused specs

Alias for: it
xit(description, &block) click to toggle source

Add support for disabled specs

# File lib/pretty_bacon/context.rb, line 7
def xit(description, &block)
  Counter[:disabled] += 1
  Bacon.handle_requirement(description, true) {[]}
end