cadenero 0.0.2.a1 → 0.0.2.a2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.md +16 -7
- data/lib/cadenero/version.rb +1 -1
- data/lib/generators/cadenero/install_generator.rb +1 -1
- data/spec/dummy/log/development.log +81 -0
- data/spec/dummy/log/test.log +464 -3380
- data/spec/generators/install_generator_spec.rb +24 -2
- metadata +1 -1
@@ -16,9 +16,31 @@ describe Cadenero::Generators::InstallGenerator do
|
|
16
16
|
Dir["#{Rails.root}/db/migrate/*.rb"].sort
|
17
17
|
end
|
18
18
|
|
19
|
-
|
19
|
+
it "copies over the migrations" do
|
20
|
+
migrations.should be_empty
|
21
|
+
capture(:stdout) do
|
22
|
+
described_class.start(["--user-class=User", "--no-migrate", "--current-user-helper=current_user",
|
23
|
+
"--default-account-name=Root", "--default-account-subdomain=www", "--default-user-email=testy@example.com",
|
24
|
+
"--default-user-password=change-me"], :destination => Rails.root)
|
25
|
+
end
|
26
|
+
|
27
|
+
# Ensure cadenero migrations have been copied over
|
28
|
+
migrations.should_not be_empty
|
29
|
+
|
30
|
+
# Ensure initializer has been created
|
31
|
+
#cadenero_initializer = File.readlines("#{Rails.root}/config/initializers/cadenero.rb")
|
32
|
+
#cadenero_initializer[0].strip.should == %q{Cadenero.user_class = "User"}
|
33
|
+
|
34
|
+
# Ensure cadenero_user is added to ApplicationController
|
35
|
+
application_controller = File.read("#{Rails.root}/app/controllers/application_controller.rb")
|
36
|
+
expected_cadenero_user_method = %Q{
|
37
|
+
def cadenero_user
|
38
|
+
current_user
|
39
|
+
end
|
40
|
+
helper_method :cadenero_user
|
20
41
|
|
21
|
-
|
42
|
+
}
|
43
|
+
application_controller.should include(expected_cadenero_user_method)
|
22
44
|
Cadenero::V1::Account.count.should == 0
|
23
45
|
Cadenero::User.count.should == 0
|
24
46
|
|