Sha256: fd833b51595b15282a1170df466f7fd1b679873ea38ceaf01ac75195a5c15ee7

Contents?: true

Size: 1.43 KB

Versions: 27

Compression:

Stored size: 1.43 KB

Contents

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

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

27 entries across 27 versions & 1 rubygems

Version Path
trackman-0.3.1 spec/rails32/first_push_spec.rb
trackman-0.3.0 spec/rails32/first_push_spec.rb
trackman-0.2.90 spec/rails32/first_push_spec.rb
trackman-0.2.89 spec/rails32/first_push_spec.rb
trackman-0.2.88 spec/rails32/first_push_spec.rb
trackman-0.2.87 spec/rails32/first_push_spec.rb
trackman-0.2.86 spec/rails32/first_push_spec.rb
trackman-0.2.85 spec/rails32/first_push_spec.rb
trackman-0.2.84 spec/rails32/first_push_spec.rb
trackman-0.2.83 spec/rails32/first_push_spec.rb
trackman-0.2.82 spec/rails32/first_push_spec.rb
trackman-0.2.81 spec/rails32/first_push_spec.rb
trackman-0.2.80 spec/rails32/first_push_spec.rb
trackman-0.2.65 spec/rails32/first_push_spec.rb
trackman-0.2.64 spec/rails32/first_push_spec.rb
trackman-0.2.63 spec/rails32/first_push_spec.rb
trackman-0.2.62 spec/rails32/first_push_spec.rb
trackman-0.2.61 spec/rails32/first_push_spec.rb
trackman-0.2.5 spec/rails32/first_push_spec.rb
trackman-0.2.4 spec/rails32/first_push_spec.rb