minitest

    2熱度

    2回答

    我正在使用一個外部API,它接受一個密鑰字符串,並希望將此密鑰字符串傳遞給測試套件。喜歡的東西: rake test [key=api_key] 與測試一起的代碼將是開源的,但我不能給我的鑰匙串分配給其他用戶,所以我不能把它的測試文件。我可以將它作爲參數傳遞嗎?

    0熱度

    1回答

    我正在嘗試使用minitest和webrat測試ruby驗證應用程序,但遇到錯誤。 試驗等visit '/'失敗,錯誤Status 200 expected but was 404. 含有像fill_in :email, :with => "[email protected]"代碼測試失敗,錯誤Could not find field: :email。 我讀了幾個sinatra,測試和webrat

    3熱度

    1回答

    我正在嘗試爲ActiveRecord編寫測試 - 而Rails使用MiniTest進行測試,所以我沒有測試框架的選擇。我想測試的條件是這個(從DB:創建耙任務,被拉入的方法這個例子的目的): def create_db if File.exist?(config['database']) $stderr.puts "#{config['database']} already e

    1熱度

    1回答

    有沒有一種標準方法可以使assert_equal的故障輸出更具可讀性? test "compare" do assert_equal "some string", "some string that differs" end 這將產生: MiniTest::Assertion: <"some string"> expected but was <"some string that

    0熱度

    2回答

    我預計這些發電機可用: $ rails g Usage: rails generate GENERATOR [args] [options] MiniTest: mini_test:controller mini_test:helper mini_test:install mini_test:mailer mini_test:model

    2熱度

    1回答

    我試圖在VM中使用chef-minitest-handler和Vagrant測試我的廚師食譜。我能夠運行測試,但我想將它集成到Jenkins中。 是否有任何可能以Jenkins能夠理解的方式(例如jUnit)保存從廚師[VM收斂]獲得的測試結果並顯示良好的通過/失敗測試圖?

    0熱度

    2回答

    我知道如何編寫測試MINITEST的以下樣式... require "minitest_helper" class ApplicationHelperTest < ActionView::TestCase def test_nav_element_for_current_page self.stub(:current_page?, true) do nav_

    -1熱度

    1回答

    在rails 3.2/minitest項目中首次調用'skip'時出現未定義錯誤。 require "test_helper" describe "Test Integration Test" do describe "area1" do it "must do X" do assert true end it "must do Y" do

    1熱度

    1回答

    我想測試一個使用minitest和水豚的sinatra應用程序,但在使用像fill_in或訪問水豚功能的所有測試中得到幾個錯誤。 的test_index給出: 未定義局部變量或者用於#方法`應用」 test_create_user給出: 無效表達:.////form[@id ='register'] test_same_email giv ES: 無法找到的CSS 「#register」 test

    14熱度

    2回答

    我試圖測試一個Rails控制器分支,當模型方法引發錯誤時觸發。 def my_controller_method @my_object = MyObject.find(params[:id]) begin result = @my_object.my_model_method(params) rescue Exceptions::CustomError =