Sha256: 170ba0b44f18d9e80b7b4e0bc8c6327ed0e06dc4a798890728f9adf6f00a7dc2
Contents?: true
Size: 1.01 KB
Versions: 1
Compression:
Stored size: 1.01 KB
Contents
require './spec_env.rb' describe "When getting the configured sites" do before(:all) do configure do |cfg| @sites = cfg.get_sites end end it "at least one item should be returned" do @sites.size.should > 1 end end describe "When adding a new site" do before(:all) do configure do |cfg| @sites = cfg.get_sites @site = @sites.add { |s| s.name = generate_random_name } end end it "the site should be created" do @site.should_not be_nil end context "When the site ids in IIS are not in ascending order" do before(:all) do @site2 = @sites.add { |s| s.name = generate_random_name } @sites.remove(@sites.find_index { |site| site.id == @site.id }) end it "the new site id should be one higher then the highest existing site id" do ids = [] @sites.each { |s| ids << s.id } max_id = ids.max @site3 = @sites.add { |s| s.name = generate_random_name } @site3.id.should == max_id + 1 end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
inetmgr-0.7.0 | spec/site_spec.rb |