spec/jekyll_auth_spec.rb in jekyll-auth-2.0.0 vs spec/jekyll_auth_spec.rb in jekyll-auth-2.1.0

- old
+ new

@@ -1,12 +1,11 @@ require "spec_helper" describe "JekyllAuth" do - before(:each) do setup_tmp_dir - JekyllAuth.instance_variable_set("@config",nil) + JekyllAuth.instance_variable_set("@config", nil) end it "should know the config file path" do expected = File.expand_path "tmp/_config.yml", base_dir expect(JekyllAuth.config_file).to eql(expected) @@ -21,11 +20,11 @@ expect(JekyllAuth.config).to eql({}) end it "should return the config hash if the config files contains jekyll_auth" do File.write(JekyllAuth.config_file, "jekyll_auth:\n ssl: true\n whitelist:\n - drafts?\n") - expect(JekyllAuth.config).to eql({"ssl"=>true, "whitelist"=>["drafts?"]}) + expect(JekyllAuth.config).to eql("ssl" => true, "whitelist" => ["drafts?"]) end it "should disable ssl by default" do expect(JekyllAuth.ssl?).to eql(false) end @@ -40,8 +39,8 @@ expect(JekyllAuth.ssl?).to eql(true) end it "should parse the whitelist" do File.write(JekyllAuth.config_file, "jekyll_auth:\n whitelist:\n - drafts?\n") - expect(JekyllAuth.whitelist).to eql(/drafts?/) + expect(JekyllAuth.whitelist).to eql(%r!drafts?!) end end