Sha256: 4ba419f4c395bf7ec2d721782c4a89ddb365733c99d3752c993609003ed1189a
Contents?: true
Size: 1.31 KB
Versions: 6
Compression:
Stored size: 1.31 KB
Contents
require 'spec_helper' root_dir = Rails3::Assist::Directory.rails_root describe 'controller' do use_orm :none use_helpers :controller, :app before :each do create_empty_tmp :controller create_controller :account do %q{ def index end } end end after :each do remove_controllers :account, :person end it "should not have :controller artifact :person" do root_dir.should_not have_artifact :person, :controller end it "should have model" do create_model :user root_dir.should have_artifact :user, :model puts read_model :user root_dir.should have_model :user end it "should have an account_controller file that contains an AccountController class with an index method inside" do root_dir.should have_artifact :account, :controller do |content| content.should have_method :index end create_controller :person do %q{ def index end } end root_dir.should have_artifacts :controller, :account, :person root_dir.should have_artifacts :controller, [:account, :person] end it "should not have :controller artifacts :account and :user" do root_dir.should_not have_artifacts :controller, [:account, :user] end end
Version data entries
6 entries across 6 versions & 1 rubygems