Run transpec for spec/support

This commit is contained in:
luisramos0
2019-05-09 23:39:30 +01:00
parent 9cfba8ad19
commit 0075ffbc02
4 changed files with 14 additions and 3 deletions

View File

@@ -3,7 +3,7 @@ module OpenFoodNetwork
def set_feature_toggle(feature, status)
features = OpenFoodNetwork::FeatureToggle.features
features[feature] = status
OpenFoodNetwork::FeatureToggle.stub(:features) { features }
allow(OpenFoodNetwork::FeatureToggle).to receive(:features) { features }
end
end
end

View File

@@ -66,4 +66,15 @@ end
RSpec.configure do |config|
config.extend AuthenticationWorkflow, :type => :feature
# rspec-rails 3 will no longer automatically infer an example group's spec type
# from the file location. You can explicitly opt-in to the feature using this
# config option.
# To explicitly tag specs without using automatic inference, set the `:type`
# metadata manually:
#
# describe ThingsController, :type => :controller do
# # Equivalent to being in spec/controllers
# end
config.infer_spec_type_from_file_location!
end

View File

@@ -50,7 +50,7 @@ module UIComponentHelper
def modal_should_be_open_for(object)
within ".reveal-modal" do
page.should have_content object.name
expect(page).to have_content object.name
end
end

View File

@@ -21,7 +21,7 @@ module WebHelper
selector += "[placeholder='#{opts[:placeholder]}']" if opts.key? :placeholder
element = page.all(selector).first
element.value.should == opts[:with] if element && opts.key?(:with)
expect(element.value).to eq(opts[:with]) if element && opts.key?(:with)
have_selector selector
end