Sha256: 34f130b70bd19b0776f9fad1211fca72bbd0dbb9ad423c796a43c4d8a0cd9564
Contents?: true
Size: 1.01 KB
Versions: 2
Compression:
Stored size: 1.01 KB
Contents
# encoding: utf-8 require File.dirname(__FILE__) + '/integration_helper' describe Locomotive::Wagon do it 'imports' do File.exists?('site/config/site.yml').should be_false clone_site YAML.load_file('site/config/site.yml').should == { 'name' =>'locomotive', 'locales' =>['en', 'es'], 'subdomain' =>'locomotive', 'domains' =>['locomotive.engine.dev'] } end it 'pushes' do clone_site file_name = File.dirname(__FILE__) + '/../../site/app/views/pages/index.liquid' text = File.read(file_name) text.gsub!(/Content of the home page/, 'New content of the home page') File.open(file_name, 'w') { |file| file.puts text} VCR.use_cassette('push') do Locomotive::Wagon.push('site', {'host' => 'locomotive.engine.dev:3000'}, 'email' => 'admin@locomotivecms.com', 'password' => 'locomotive') end WebMock.should have_requested(:put, /pages\/.+.json\?auth_token=.+/).with(:body => /page\[raw_template\]=New%20content%20of%20the%20home%20page/).once end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
locomotivecms_wagon-1.0.1 | spec/integration/sites_spec.rb |
locomotivecms_wagon-1.0.0 | spec/integration/sites_spec.rb |