Navigation Menu

Skip to content

Commit

Permalink
Have source_caching_disabled hard default to false.
Browse files Browse the repository at this point in the history
Fancy format detection is fragile and might break in unusual
configurations, leading to developer frustration.
  • Loading branch information
jimweirich committed Feb 4, 2014
1 parent f411b7c commit 5ed52d1
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
8 changes: 0 additions & 8 deletions lib/given/module_methods.rb
Expand Up @@ -23,14 +23,6 @@ def self.source_caching_disabled=(value)
@_gvn_source_caching_disabled = value
end

# Detect the formatting requested in the given configuration object.
#
# If the format requires it, source caching will be enabled.
def self.detect_formatters(c)
format_active = c.formatters.any? { |f| f.class.name !~ /ProgressFormatter/ }
Given.source_caching_disabled = ! format_active
end

# Globally enable/disable natural assertions.
#
# There is a similar function in Extensions that works at a
Expand Down
2 changes: 1 addition & 1 deletion lib/given/rspec/configure.rb
Expand Up @@ -16,5 +16,5 @@
end

Given.use_natural_assertions if Given::NATURAL_ASSERTIONS_SUPPORTED
Given.detect_formatters(c)
Given.source_caching_disabled = false
end

0 comments on commit 5ed52d1

Please sign in to comment.