Sha256: 2a740d2f6ee3fde6a60df5d60e1830767a2a3906058b43729ffa521a7b39609e
Contents?: true
Size: 738 Bytes
Versions: 1
Compression:
Stored size: 738 Bytes
Contents
require 'spec_helper' require 'hibachi/recipe' module Hibachi describe Recipe do class MockForRecipe < Hibachi::Model recipe :name_of_recipe, :type => :singleton attr_accessor :name end it "sets the recipe in the class definition" do expect(MockForRecipe.recipe_name).to eq(:name_of_recipe) end it "sets the type of recipe in the class definition" do expect(MockForRecipe.recipe_type).to eq('singleton') end it "is a singleton" do expect(MockForRecipe).to be_singleton end context "with an instantiated singleton" do subject { MockForRecipe.new name: 'test' } it "is a singleton" do expect(subject).to be_singleton end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
hibachi-0.0.1.pre | spec/hibachi/recipe_spec.rb |