Skip to content

Commit

Permalink
Make code more readable.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jay Shah authored and jaysh committed Sep 21, 2017
1 parent fcc5d35 commit d31e445
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions spec/calendar_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,10 @@
describe Business::Calendar do
describe ".load" do
before do
Business::Calendar.additional_load_paths = [
File.join(File.dirname(__FILE__), 'fixtures', 'calendars')
]
fixture_path = File.join(File.dirname(__FILE__), 'fixtures', 'calendars')
Business::Calendar.additional_load_paths = [fixture_path]
end

let(:data_path) { File.join(File.dirname(__FILE__), '..', 'lib', 'business', 'data') }

context "when given a valid calendar" do
subject { Business::Calendar.load("weekdays") }

Expand Down Expand Up @@ -63,6 +60,7 @@
end

context "when given real business data" do
let(:data_path) { File.join(File.dirname(__FILE__), '..', 'lib', 'business', 'data') }
it "validates they are all loadable by the calendar" do
Dir.glob("#{data_path}/*").each do |filename|
calendar_name = File.basename(filename, ".yml")
Expand Down

0 comments on commit d31e445

Please sign in to comment.