spec/support/theme_helper.rb in rack-dev-mark-0.2.0 vs spec/support/theme_helper.rb in rack-dev-mark-0.3.0
- old
+ new
@@ -1,10 +1,16 @@
-RSpec.shared_examples "theme" do
+RSpec.shared_context "theme context" do
def read_stylesheet(path)
::File.open(::File.join(::File.dirname(__FILE__), '../../vendor/assets/stylesheets', path)).read
end
+ before do
+ subject.setup 'env', 'rev'
+ end
+end
+
+RSpec.shared_examples "theme" do
let (:src) { %Q~<html><head>head<title>title</title></head><body>body</body></html>~ }
- it "insert env mark" do
- expect(subject.insert_into(src, 'env', 'rev')).to eq(out)
+ it "inserts env mark" do
+ expect(subject.insert_into(src)).to eq(out)
end
end