Sha256: 46e8fe03ce6391cf932e947f93be119f61af1775f37a593259e7af3e4e160cfe
Contents?: true
Size: 1.01 KB
Versions: 1
Compression:
Stored size: 1.01 KB
Contents
require 'spec_helper' module Alf describe Environment do subject{ Environment } it { should respond_to(:folder) } describe "folder" do subject{ Environment.folder(File.dirname(__FILE__)) } it{ should be_a(Environment::Folder) } end describe "autodetect" do it "should support an Environment instance" do env = Environment.examples Environment.autodetect(env).should eq(env) end it "should recognize an existing folder" do env = Environment.autodetect(File.dirname(__FILE__)) env.should be_a(Environment::Folder) end it "should raise an Argument when no match" do lambda{ Environment.autodetect(12) }.should raise_error(ArgumentError) end it "should be aliased as coerce" do env = Environment.examples Environment.coerce(env).should eq(env) Environment.coerce(File.dirname(__FILE__)).should be_a(Environment::Folder) end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
alf-0.9.3 | spec/unit/test_environment.rb |