Sha256: c05fc10041021d13617f7115cb71dfc34ce0f6670d3cc3750abc61d032e516d2

Contents?: true

Size: 1.39 KB

Versions: 6

Compression:

Stored size: 1.39 KB

Contents

require 'spec_helper'
require 'helpers/app_creator'
require 'helpers/fakable_pathman_tester'

describe 'first push' do
  before :all do
    FakablePathManTester.switch_on 'spec/fixtures/rails32/clean-install/'
  end
  before :each do
    AppCreator.create
  end

  after :all do
    AppCreator.reset
    FakablePathManTester.switch_off
  end

  it "does not do anything on a clean install" do  
    expected = RemoteAsset.all

    Asset.sync

    actual = RemoteAsset.all

    actual.should == expected
  end
end

describe 'happy path' do
  before :all do
    FakablePathManTester.switch_on 'spec/fixtures/rails32/happy-path/'
  end
  before :each do
    AppCreator.create
  end

  after :all do
    AppCreator.reset
    FakablePathManTester.switch_off
  end

  it "replaces the default templates by the assets" do
    expected = Asset.all
    Asset.sync
    
    actual = RemoteAsset.all
    
    actual.should == expected
  end
end

describe 'full path' do
  before :all do
    FakablePathManTester.switch_on 'spec/fixtures/rails32/fully-loaded/'
    ActLikeRails32.switch_on
  end
  before :each do
    AppCreator.create
  end

  after :all do
    AppCreator.reset
    FakablePathManTester.switch_off
    ActLikeRails32.switch_off
  end

  it "replaces all images" do
   local = Asset.all

   Asset.sync
   remote = RemoteAsset.all
   
   remote.count.should == 7
   
   local.each{|l| remote.should include(l) }
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
trackman-0.1.5 spec/rails32/first_push_spec.rb
trackman-0.1.4 spec/rails32/first_push_spec.rb
trackman-0.1.3 spec/rails32/first_push_spec.rb
trackman-0.1.2 spec/rails32/first_push_spec.rb
trackman-0.0.9 spec/rails32/first_push_spec.rb
trackman-0.0.8 spec/rails32/first_push_spec.rb