Skip to content

Commit

Permalink
Conditionally enable contracts
Browse files Browse the repository at this point in the history
  • Loading branch information
denisdefreyne committed Jun 18, 2016
1 parent 6e21187 commit e343195
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/nanoc/base/contracts_support.rb
Expand Up @@ -10,7 +10,7 @@ def self.included(base)
end

def contract(*args)
# TODO: conditionally enable for testing only (or CONTRACTS=true)
return unless ENV['CONTRACTS'] || $CONTRACTS
Contract(*args)
end
end
Expand Down
2 changes: 2 additions & 0 deletions spec/spec_helper.rb
@@ -1,3 +1,5 @@
$CONTRACTS = true

require 'simplecov'
SimpleCov.start

Expand Down
1 change: 1 addition & 0 deletions test/helper.rb
@@ -1,4 +1,5 @@
$VERBOSE = false
$CONTRACTS = true

require 'simplecov'
SimpleCov.start
Expand Down

0 comments on commit e343195

Please sign in to comment.