spec/mobile_enhancements/configuration_spec.rb in mobile-enhancements-0.0.1 vs spec/mobile_enhancements/configuration_spec.rb in mobile-enhancements-0.0.2
- old
+ new
@@ -16,21 +16,29 @@
describe "defining mobile configuration" do
before do
subject.mobile do
prefix "m"
layout "mob"
+ format "mbl"
end
end
it "should store the prefix" do
expect(subject.mobile.prefix).to eq "m"
+ expect(subject.mobile_path_prefix).to eq "m"
end
it "should store the layout" do
expect(subject.mobile.layout).to eq "mob"
+ expect(subject.mobile_layout).to eq "mob"
end
+ it "should store the format" do
+ expect(subject.mobile.format).to eq "mbl"
+ expect(subject.mobile_format).to eq :mbl
+ end
+
it "should raise method missing for undefined options" do
expect { subject.mobile.banana(1,2) }.to raise_error(NoMethodError)
end
end
@@ -41,8 +49,9 @@
end
end
it "should store the layout" do
expect(subject.desktop.layout).to eq "desktop"
+ expect(subject.desktop_layout).to eq "desktop"
end
end
end
\ No newline at end of file