-
Notifications
You must be signed in to change notification settings - Fork 259
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Replace Test::Unit with a newer version of mintiest. * Primary reason: Nested describe contexts should make test intent clearer.
- Loading branch information
Showing
15 changed files
with
90 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
ENV["RAILS_ENV"] = "test" | ||
require File.expand_path("../dummy/config/environment.rb", __FILE__) | ||
|
||
require "minitest/autorun" | ||
require "minitest/rails" | ||
|
||
#require 'minitest/reporters' | ||
#MiniTest::Reporters.use! | ||
|
||
# Uncomment if you want Capybara in accceptance/integration tests | ||
# require "minitest/rails/capybara" | ||
|
||
# Uncomment if you want awesome colorful output | ||
# require "minitest/pride" | ||
|
||
class MiniTest::Rails::ActiveSupport::TestCase | ||
# Setup all fixtures in test/fixtures/*.(yml|csv) for all tests in alphabetical order. | ||
fixtures :all | ||
|
||
# Add more helper methods to be used by all tests here... | ||
end | ||
|
||
# Do you want all existing Rails tests to use MiniTest::Rails? | ||
# Comment out the following and either: | ||
# A) Change the require on the existing tests to `require "minitest_helper"` | ||
# B) Require this file's code in test_helper.rb | ||
|
||
#MiniTest::Rails.override_testunit! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,21 @@ | ||
require "test_helper" | ||
require 'minitest_helper' | ||
|
||
class MecuryEditorTest < ActiveSupport::TestCase | ||
describe "MercuryEditor" do | ||
|
||
test "#editor_type_for Text Areas" do | ||
field_info = Cms::HtmlBlock.new.editor_info(:content) | ||
assert_equal "full", field_info[:region] | ||
assert_equal "div", field_info[:element] | ||
end | ||
describe "#editor_info" do | ||
|
||
test "#editor_type_for text fields" do | ||
field_info = content_block().editor_info(:name) | ||
assert_equal "simple", field_info[:region] | ||
assert_equal "span", field_info[:element] | ||
end | ||
let(:content_block) { Cms::HtmlBlock.new } | ||
|
||
private | ||
it "returns full for text area fields" do | ||
field_info = content_block.editor_info(:content) | ||
field_info[:region].must_equal "full" | ||
field_info[:element].must_equal "div" | ||
end | ||
|
||
# Factory for a simple content block. | ||
def content_block | ||
Cms::HtmlBlock.new | ||
it "returns simple region for text fields" do | ||
field_info = content_block.editor_info(:name) | ||
field_info[:region].must_equal "simple" | ||
field_info[:element].must_equal "span" | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,5 @@ | ||
require 'test_helper' | ||
|
||
require 'mocha' | ||
|
||
class CmsDomainSupportTest < ActiveSupport::TestCase | ||
|
||
def setup | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
require "test_helper" | ||
require "mocha" | ||
require "mocha/setup" | ||
|
||
class CommandLineTest < ActiveSupport::TestCase | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters