imathis / clash Goto Github PK
View Code? Open in Web Editor NEWA diff based testing framework for Jekyll and other static sites.
License: MIT License
A diff based testing framework for Jekyll and other static sites.
License: MIT License
Hey!
I was just building out Jekyll textile converter and wanted to use clash to run the integration tests, but I'm a little confused on where the configuration should live and when the configuration supersedes the args passed to clash
, etc.
Rspec has rspec --init
which creates spec/spec_helper.rb
and .rspec
. You know you're all set to write specs from then on out. Maybe a similar feature?
This will bump the major version release, so… pressures on. 😜
The new convention will be like this:
Paths
test/
_clash.yml
scenario-1/
_expected/index.html
index.html
Sample clash config.
build: scenario-1
compare: _expected _site
The main change here is that build will now accept true
or some_dir
and Jekyll will either build from the test directory or test/[build_dir]
. Then when doing the comparison, it will prepend the test/[build_dir]
to each comparison. This will enable the same flexibility that Clash has now, but make it easier to quickly test lots of different scenarios.
When the init task is added (#11), it will will follow this convention too. It might also be a good idea to create a scaffold for scenarios.
Perhaps you could run clash new scenario-name --dir test
and it would append add the new scaffold files to your test directory, and output the default yaml you can add to your _clash.yml file.
I'm using Windows at work (unfortunately) and when I run bundle exec clash test
, I get below stack trace. Double checked on Ubuntu and works fine there.
c:/tools/ruby215/lib/ruby/2.1.0/find.rb:42:in `block in find': No such file or directory (Errno::ENOENT)
from c:/tools/ruby215/lib/ruby/2.1.0/find.rb:42:in `collect!'
from c:/tools/ruby215/lib/ruby/2.1.0/find.rb:42:in `find'
from c:/Users/User/Repositories/clash/lib/clash/diff.rb:64:in `each'
from c:/Users/User/Repositories/clash/lib/clash/diff.rb:64:in `to_a'
from c:/Users/User/Repositories/clash/lib/clash/diff.rb:64:in `dir_files'
from c:/Users/User/Repositories/clash/lib/clash/diff.rb:51:in `mattching_dir_files'
from c:/Users/User/Repositories/clash/lib/clash/diff.rb:40:in `diff_dirs'
from c:/Users/User/Repositories/clash/lib/clash/diff.rb:17:in `diff'
from c:/Users/User/Repositories/clash/lib/clash/test.rb:97:in `block in compare'
from c:/Users/User/Repositories/clash/lib/clash/test.rb:93:in `each'
from c:/Users/User/Repositories/clash/lib/clash/test.rb:93:in `compare'
from c:/Users/User/Repositories/clash/lib/clash/test.rb:18:in `run'
from c:/Users/User/Repositories/clash/lib/clash/tests.rb:64:in `run_test'
from c:/Users/User/Repositories/clash/lib/clash/tests.rb:51:in `block (2 levels) in run'
from c:/Users/User/Repositories/clash/lib/clash/tests.rb:47:in `each'
from c:/Users/User/Repositories/clash/lib/clash/tests.rb:47:in `each_with_index'
from c:/Users/User/Repositories/clash/lib/clash/tests.rb:47:in `block in run'
from c:/Users/User/Repositories/clash/lib/clash/tests.rb:46:in `chdir'
from c:/Users/User/Repositories/clash/lib/clash/tests.rb:46:in `run'
from c:/Users/User/Repositories/clash/bin/clash:79:in `<top (required)>'
from c:/tools/ruby215/lib/ruby/gems/2.1.0/bin/clash:23:in `load'
from c:/tools/ruby215/lib/ruby/gems/2.1.0/bin/clash:23:in `<main>'
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.