Sha256: 1c9699a1a79b069401842769e2cf195547c1dbb1c2e87cbb10a92bdf80463211

Contents?: true

Size: 549 Bytes

Versions: 4

Compression:

Stored size: 549 Bytes

Contents

require 'spec_helper'

class TestTemplate1 < ::RailsMaker::TemplateRunner
  def on_invocation
    return "hi"
  end
end

class TestTemplate2 < ::RailsMaker::TemplateRunner
end

describe RailsMaker::TemplateRunner do

  it "should not raise an error if the on_invocation method is implemented" do
    lambda {
      TestTemplate1.new.on_invocation
    }.should_not raise_error
  end

  it "should raise an error if the on_invocation method isn't implemented" do
    lambda {
      TestTemplate2.new.on_invocation
    }.should raise_error
  end

end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
rails-maker-0.1.11 spec/railsmaker_template_runner_spec.rb
rails-maker-0.1.9 spec/railsmaker_template_runner_spec.rb
rails-maker-0.1.7 spec/railsmaker_template_runner_spec.rb
rails-maker-0.1.1 spec/railsmaker_template_runner_spec.rb