Sha256: 444cd9aaca4b2e9a796d7b4460c18eb0fdc316cbf0d4f65e2455b2eb55258684

Contents?: true

Size: 1.11 KB

Versions: 151

Compression:

Stored size: 1.11 KB

Contents

require 'spec_helper'

describe RailsWizard::Recipes do
  subject{ RailsWizard::Recipes }

  before(:all) do
    @recipe = RailsWizard::Recipe.generate( "recipe_test", "# Testing", {
        :category    =>        'test',
        :description => 'Just a test.',
        :name        =>        'Test Recipe',
        } )
    RailsWizard::Recipes.add(@recipe)
  end

  it '.list_classes should include recipe classes' do
    subject.list_classes.should be_include(@recipe)
  end

  it '.list should include recipe keys' do
    subject.list.should be_include('recipe_test')
  end

  describe '.for' do
    it 'should find for a given category' do
      RailsWizard::Recipes.for('test').should be_include('recipe_test')
    end
  end

  it 'should add recipes in a directory with add_from_directory' do
    subject.add_from_directory(File.join(File.dirname(__FILE__), '..', 'test_recipes'))
    subject.list.should include 'test_recipe_in_file'
  end

  describe '.clear' do
    it 'should remove all current recipes' do
      RailsWizard::Recipes.clear
      subject.list.should == []
      subject.categories.should == []
    end
  end
end

Version data entries

151 entries across 151 versions & 3 rubygems

Version Path
rails_apps_composer-3.1.36 spec/rails_wizard/recipes_spec.rb
rails_apps_composer-3.1.35 spec/rails_wizard/recipes_spec.rb
rails_apps_composer-3.1.34 spec/rails_wizard/recipes_spec.rb
rails_apps_composer-3.1.33 spec/rails_wizard/recipes_spec.rb
rails_apps_composer-3.1.31 spec/rails_wizard/recipes_spec.rb
rails_apps_composer-3.1.30 spec/rails_wizard/recipes_spec.rb
rails_apps_composer-3.1.29 spec/rails_wizard/recipes_spec.rb
rails_apps_composer-3.1.28 spec/rails_wizard/recipes_spec.rb
rails_apps_composer-3.1.27 spec/rails_wizard/recipes_spec.rb
rails_apps_composer-3.1.25 spec/rails_wizard/recipes_spec.rb
rails_apps_composer-3.1.24 spec/rails_wizard/recipes_spec.rb
rails_apps_composer-3.1.23 spec/rails_wizard/recipes_spec.rb
rails_apps_composer-3.1.22 spec/rails_wizard/recipes_spec.rb
rails_apps_composer-3.1.21 spec/rails_wizard/recipes_spec.rb
rails_apps_composer-3.1.20 spec/rails_wizard/recipes_spec.rb
rails_apps_composer-3.1.19 spec/rails_wizard/recipes_spec.rb
rails_apps_composer-3.1.18 spec/rails_wizard/recipes_spec.rb
rails_apps_composer-3.1.17 spec/rails_wizard/recipes_spec.rb
rails_apps_composer-3.1.16 spec/rails_wizard/recipes_spec.rb
rails_apps_composer-3.1.15 spec/rails_wizard/recipes_spec.rb