Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Revert "Type is now always `feature`, which matches Capybara 2.0"

This reverts commit 1ac5f66.
  • Loading branch information...
commit 5c897070d22555a4a6829e5e0eb7ace531d7f0f8 1 parent 1ac5f66
@jnicklas authored
View
6 lib/turnip.rb
@@ -18,8 +18,14 @@ class Ambiguous < StandardError; end
#
module Steps
end
+
+ class << self
+ attr_accessor :type
+ end
end
+Turnip.type = :turnip
+
Module.send(:include, Turnip::Define)
self.extend Turnip::DSL
View
2  lib/turnip/builder.rb
@@ -40,7 +40,7 @@ def line
end
def metadata_hash
- super.merge(:type => :feature, :turnip => true)
+ super.merge(:type => Turnip.type, :turnip => true)
end
end
View
2  lib/turnip/capybara.rb
@@ -1,5 +1,7 @@
require 'capybara/rspec'
+Turnip.type = :request
+
RSpec.configure do |config|
config.before do
if self.class.include?(Capybara::DSL) and example.metadata[:turnip]

3 comments on commit 5c89707

@gravis

why did you revert this? (just curious)

@jnicklas
Owner

Because this change broke compatibility with 1.0. 514118a makes essentially the same change but in a backwards compatible way.

@gravis
Please sign in to comment.
Something went wrong with that request. Please try again.