-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
84 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
require File.expand_path("#{File.dirname __FILE__}/../lilypad") | ||
|
||
module Rack | ||
class Lilypad | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
require File.expand_path("#{File.dirname __FILE__}/../../spec_helper") | ||
|
||
describe Lilypad::Config::Request do | ||
|
||
before(:each) do | ||
Lilypad::Config::Request.action 'action' | ||
Lilypad::Config::Request.component 'component' | ||
end | ||
|
||
after(:each) do | ||
Lilypad::Config::Request.class_eval do | ||
@action = nil | ||
@component = nil | ||
end | ||
end | ||
|
||
it "should set options" do | ||
Lilypad::Config::Request.action.should == 'action' | ||
Lilypad::Config::Request.component.should == 'component' | ||
end | ||
|
||
it "should provide a method to reset all options" do | ||
Lilypad::Config::Request.reset! | ||
Lilypad::Config::Request.action.should == nil | ||
Lilypad::Config::Request.component.should == nil | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
require File.expand_path("#{File.dirname __FILE__}/../spec_helper") | ||
|
||
describe Lilypad::Config do | ||
|
||
before(:each) do | ||
Lilypad::Config.api_key 'api_key' | ||
Lilypad::Config.deploy_url 'deploy_url' | ||
Lilypad::Config.environments 'environments' | ||
Lilypad::Config.filters 'filters' | ||
Lilypad::Config.log 'log' | ||
Lilypad::Config.notify_url 'notify_url' | ||
end | ||
|
||
after(:each) do | ||
Lilypad::Config.class_eval do | ||
@api_key = nil | ||
@deploy_url = nil | ||
@environments = nil | ||
@filters = nil | ||
@log = nil | ||
@notify_url = nil | ||
end | ||
end | ||
|
||
it "should set options" do | ||
Lilypad::Config.api_key.should == 'api_key' | ||
Lilypad::Config.deploy_url.should == 'deploy_url' | ||
Lilypad::Config.environments.should == 'environments' | ||
Lilypad::Config.filters.should == 'filters' | ||
Lilypad::Config.log.should == 'log' | ||
Lilypad::Config.notify_url.should == 'notify_url' | ||
end | ||
|
||
it "should require the rails adapter when the rails method is called" do | ||
adapter = File.expand_path "#{SPEC}/../lib/lilypad/adapters/rails" | ||
Lilypad::Config.should_receive(:require).with(adapter) | ||
Lilypad::Config.rails | ||
end | ||
|
||
it "should require the rails adapter when the sinatra method is called" do | ||
adapter = File.expand_path "#{SPEC}/../lib/lilypad/adapters/sinatra" | ||
Lilypad::Config.should_receive(:require).with(adapter) | ||
Lilypad::Config.sinatra | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -62,7 +62,6 @@ | |
rescue Exception => e | ||
Lilypad.notify(e) | ||
end | ||
validate_xml | ||
end | ||
|
||
it "should provide a deploy method" do | ||
|