Sha256: 34e3822835ecbf4fdb68b1cc1e6d8498e19afbe2fdbaaa22eac2d4fe3f97b939

Contents?: true

Size: 941 Bytes

Versions: 2

Compression:

Stored size: 941 Bytes

Contents

require "spec_helper" 

require "generators/angular_velocity/service/service_generator"

describe AngularVelocity::Generators::ServiceGenerator do

  include GeneratorSpec::TestCase
  include GenSpecHelpers 
  include AngularVelocity::Generators::AngularConfig
  
  destination File.expand_path("../../tmp", __FILE__)

  before(:each) do 
    prepare_destination
    run_generator ["post"]
  end

  let(:angular_test_app_path) { "spec/tmp/#{angular_path}" }
  let(:angular_test_app_spec_path) { "spec/tmp/#{angular_spec_path}" }
  

  it "should generator a post service" do
    
    ("#{angular_test_app_path}/services/post_service.coffee").should be_a_file_containing_text(%{  class Post})
  end


  it "should generate a post service spec" do
    service_spec_path = "#{angular_test_app_spec_path}/services/post_service_spec.coffee" 
    service_spec_path.should be_a_file_containing_text(%{describe "Service: Post", () ->})
  end

  
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
angular_velocity-0.0.5alpha spec/service/service_generator_spec.rb
angular_velocity-0.0.4alpha spec/service/service_generator_spec.rb