Merge pull request #10017 from vipulnsward/railties_cleanups
cleanup railties test; fix typos
This commit is contained in:
commit
d535249b48
@ -127,24 +127,23 @@ def write_prompt(command, expected_output = nil)
|
||||
end
|
||||
|
||||
def spawn_console
|
||||
pid = Process.spawn(
|
||||
Process.spawn(
|
||||
"#{app_path}/bin/rails console --sandbox",
|
||||
in: @slave, out: @slave, err: @slave
|
||||
)
|
||||
|
||||
assert_output "> ", 30
|
||||
pid
|
||||
end
|
||||
|
||||
def test_sandbox
|
||||
pid = spawn_console
|
||||
spawn_console
|
||||
|
||||
write_prompt "Post.count", "=> 0"
|
||||
write_prompt "Post.create"
|
||||
write_prompt "Post.count", "=> 1"
|
||||
@master.puts "quit"
|
||||
|
||||
pid = spawn_console
|
||||
spawn_console
|
||||
|
||||
write_prompt "Post.count", "=> 0"
|
||||
write_prompt "Post.transaction { Post.create; raise }"
|
||||
|
@ -164,7 +164,7 @@ def test_nested_fallbacks_for_generators
|
||||
Rails::Generators.invoke "super_shoulda:model", ["Account"]
|
||||
end
|
||||
|
||||
def test_developer_options_are_overwriten_by_user_options
|
||||
def test_developer_options_are_overwritten_by_user_options
|
||||
Rails::Generators.options[:with_options] = { generate: false }
|
||||
|
||||
self.class.class_eval(<<-end_eval, __FILE__, __LINE__ + 1)
|
||||
|
@ -187,7 +187,7 @@ def index
|
||||
assert_equal "Hello bukkits\n", response[2].body
|
||||
end
|
||||
|
||||
test "adds its views to view paths with lower proriority than app ones" do
|
||||
test "adds its views to view paths with lower priority than app ones" do
|
||||
@plugin.write "app/controllers/bukkit_controller.rb", <<-RUBY
|
||||
class BukkitController < ActionController::Base
|
||||
def index
|
||||
|
Loading…
Reference in New Issue
Block a user