spec/seory/dsl_spec.rb in seory-0.0.1 vs spec/seory/dsl_spec.rb in seory-0.0.2
- old
+ new
@@ -1,11 +1,12 @@
require 'spec_helper'
require 'seory/dsl'
describe Seory::Dsl do
+ let(:seory_class) { Object.new.extend(Seory::Dsl) }
before do
- Seory::Dsl.describe do
+ seory_class.describe do
match 'products#index' do
title 'My Great Product'
h1 'Great Product Name'
end
@@ -14,10 +15,10 @@
h1 { controller.controller_name.upcase }
end
end
end
- subject(:seory) { Seory::Dsl.lookup(controller) }
+ subject(:seory) { seory_class.lookup(controller) }
context 'at products#index' do
let(:controller) { double('controller', controller_name: 'products', action_name: 'index') }
specify { expect(seory.title).to eq 'My Great Product' }