-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
82 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
require "test_helper" | ||
|
||
class ConfigurationTest < Minitest::Test | ||
def teardown | ||
ClassVariants.configure do |config| | ||
config.tw_merge = false | ||
end | ||
end | ||
|
||
def test_configuration_tw_merge_default | ||
refute ClassVariants.configuration.tw_merge | ||
end | ||
|
||
def test_configuration_tw_merge_config_default | ||
assert_empty ClassVariants.configuration.tw_merge_config | ||
end | ||
|
||
def test_configure | ||
ClassVariants.configure do |config| | ||
config.tw_merge = true | ||
end | ||
|
||
assert ClassVariants.configuration.tw_merge | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
require "test_helper" | ||
|
||
class TailwindMergerTest < Minitest::Test | ||
def teardown | ||
ClassVariants.configure do |config| | ||
config.tw_merge = false | ||
end | ||
end | ||
|
||
def test_without_tw_merge | ||
assert_equal "border rounded px-2 py-1 p-5", ClassVariants.build("border rounded px-2 py-1 p-5").render | ||
end | ||
|
||
def test_with_tw_merge | ||
ClassVariants.configure do |config| | ||
config.tw_merge = true | ||
end | ||
|
||
assert_equal "border rounded p-5", ClassVariants.build("border rounded px-2 py-1 p-5").render | ||
end | ||
end |