Navigation Menu

Skip to content

Commit

Permalink
Changing method name to avoid conflict with rack-test
Browse files Browse the repository at this point in the history
  • Loading branch information
lucashungaro authored and achiurizo committed Jun 11, 2011
1 parent cfe7f2e commit 4008ad1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions lib/riot/context.rb
Expand Up @@ -2,7 +2,7 @@
require 'riot/context_helpers'

module Riot
RootContext = Struct.new(:setups, :teardowns, :detailed_description, :options)
RootContext = Struct.new(:setups, :teardowns, :detailed_description, :option_set)

# Defines the classes {Riot::Context} will use when creating new assertions and situations.
module ContextClassOverrides
Expand Down Expand Up @@ -51,7 +51,7 @@ def initialize(description, parent=nil, &definition)
@parent = parent || RootContext.new([],[], "", {})
@description = description
@contexts, @setups, @assertions, @teardowns = [], [], [], []
@options = @parent.options
@options = @parent.option_set
prepare_middleware(&definition)
end

Expand Down
6 changes: 3 additions & 3 deletions lib/riot/context_options.rb
Expand Up @@ -11,7 +11,7 @@ module ContextOptions
# @param [Object] key the key used to look up the option value later
# @param [Object] value the option value to store
def set(key, value)
options[key] = value
option_set[key] = value
end

# Returns the value of a set option. The key must match exactly, symbols and strings are not
Expand All @@ -20,13 +20,13 @@ def set(key, value)
# @param [Object] key the key used to look up the option value
# @return [Object]
def option(key)
options[key]
option_set[key]
end

# Returns the hash of defined options.
#
# @return [Hash]
def options
def option_set
@options ||= {}
end

Expand Down

0 comments on commit 4008ad1

Please sign in to comment.