Sha256: 3a0dc35600186a9984a97360b0e28cef1567484c814465724e9ce82c2e827b11

Contents?: true

Size: 710 Bytes

Versions: 11

Compression:

Stored size: 710 Bytes

Contents

require 'spec_helper'
require "generators/socialite/migrations_generator"

describe Socialite::Generators::MigrationsGenerator do
  destination File.expand_path("../../../../tmp", __FILE__)

  before(:each) do
    prepare_destination
    %w(config script).each do |dir|
      `ln -s #{Rails.root + dir} #{destination_root}`
    end
  end

  after(:each) do
    unless example.exception
      prepare_destination
    end
  end

  # using mocks to ensure proper methods are called
  # invoke_all - will call all the tasks in the generator
  it 'should run all tasks in the generator' do
    gen = generator %w(migrations)
    gen.should_receive :copy_migrations
    capture(:stdout) { gen.invoke_all }
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
socialite-0.2.1 spec/generators/socialite/migrations_generator_spec.rb
socialite-0.2.0 spec/generators/socialite/migrations_generator_spec.rb
socialite-0.1.2 spec/generators/socialite/migrations_generator_spec.rb
socialite-0.1.1 spec/generators/socialite/migrations_generator_spec.rb
socialite-0.1.0.pre.7 spec/generators/socialite/migrations_generator_spec.rb
socialite-0.1.0.pre.6 spec/generators/socialite/migrations_generator_spec.rb
socialite-0.1.0.pre.5 spec/generators/socialite/migrations_generator_spec.rb
socialite-0.1.0.pre.4 spec/generators/socialite/migrations_generator_spec.rb
socialite-0.1.0.pre.3 spec/generators/socialite/migrations_generator_spec.rb
socialite-0.1.0.pre.2 spec/generators/socialite/migrations_generator_spec.rb
socialite-0.1.0.pre spec/generators/socialite/migrations_generator_spec.rb