Skip to content

Commit

Permalink
some specs for metal
Browse files Browse the repository at this point in the history
  • Loading branch information
saturnflyer committed Sep 19, 2009
1 parent 8a4d66e commit 055314d
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions spec/metal/vapor_flow_spec.rb
@@ -0,0 +1,28 @@
require File.dirname(__FILE__) + '/../spec_helper'

describe VaporFlow do
describe "radiant_path" do
it "should return the given path prepended with a /" do
VaporFlow.radiant_path('slashy').should == '/slashy'
end
end
describe "local_or_external_path" do
it "should return the given path if it begins with 'http'" do
VaporFlow.local_or_external_path('http://saturnflyer.com').should == 'http://saturnflyer.com'
end
it "should return the given path if it begins with 'https'" do
VaporFlow.local_or_external_path('https://saturnflyer.com').should == 'https://saturnflyer.com'
end
it "should return the radiant_path if the given path does not begin with http" do
VaporFlow.local_or_external_path('about/the/site').should == VaporFlow.radiant_path('about/the/site')
end
end
describe "send_to_radiant" do
it "should return an array" do
VaporFlow.send_to_radiant.kind_of?(Array).should be_true
end
it "should have 404 as the first item in the array" do
VaporFlow.send_to_radiant.first.should == 404
end
end
end

0 comments on commit 055314d

Please sign in to comment.