Skip to content

Commit 0c4fe1b

Browse files
committed
Add RubyVM for create test.
1 parent 588a165 commit 0c4fe1b

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
require 'test_helper'
2+
ActiveSupport::Dependencies.constantize('DocumentsController')
3+
4+
class DocumentsIntegrationTest < ActionDispatch::IntegrationTest
5+
test "create" do
6+
post '/documents', params: { document: { title: "New things", content: "Doing them" } }
7+
8+
document = Document.last
9+
assert_equal 'New things', document.title
10+
assert_equal 'Doing them', document.content
11+
end
12+
end
13+
14+
Minitest.run_one_method(DocumentsIntegrationTest, 'test_create')
15+
16+
# ruby -Ilib:test test/integration/documents_rubyvm_create_test.rb
17+
puts RubyVM.stat
18+
Minitest.run_one_method(DocumentsIntegrationTest, 'test_create')
19+
puts RubyVM.stat

0 commit comments

Comments
 (0)