Skip to content

Commit

Permalink
Don't go through rails application to test config
Browse files Browse the repository at this point in the history
The Spree::Config object is an instance of AppConfiguration, and clearer
than going through the rails environment to test.
  • Loading branch information
Clarke Brunsdon committed Oct 16, 2017
1 parent c6dc9bb commit 21ca4bd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/spec/models/spree/app_configuration_spec.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
require 'rails_helper'

RSpec.describe Spree::AppConfiguration, type: :model do
let(:prefs) { Rails.application.config.spree.preferences }
let(:prefs) { Spree::Config }

it "should be available from the environment" do
prefs.layout = "my/layout"
Expand Down

0 comments on commit 21ca4bd

Please sign in to comment.