Skip to content

[WIP] unittests with travis #66

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -11,3 +11,4 @@ Thumbs.db

.rbenv-version
.rvmrc
node_modules
15 changes: 15 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
language: ruby
rvm:
- 1.9.3
cache: bundler

before_install:
- npm install casperjs

notifications:
email: false

script:
- bundle exec jekyll serve --detach --port 4000
- sleep 3
- ./node_modules/.bin/casperjs test tests/test_*.js
27 changes: 27 additions & 0 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
'use strict';

module.exports = function(grunt) {
grunt.initConfig({
ghost: {
test: {
files: [{
src: ['tests/ghost/test_*.js']
}]
},
options: {
args: {
baseUrl: 'http://localhost:4000'
},
direct: false,
logLevel: 'error',
printCommand: false,
printFilePaths: true
}
}
});

grunt.loadNpmTasks('grunt-ghost');

grunt.registerTask('test', ['ghost']);
grunt.registerTask('default', ['ghost']);
};
2 changes: 1 addition & 1 deletion _config.yml
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@
# For more see: https://github.com/mojombo/jekyll/wiki/Permalinks
permalink: /:categories/:year/:month/:day/:title

exclude: [".rvmrc", ".rbenv-version", "README.md", "Rakefile", "changelog.md"]
exclude: [".rvmrc", ".rbenv-version", "README.md", "Rakefile", "changelog.md","vendor"]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what does this vendor directory contain?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this we need to fix the building error

bundle exec rake travis or easier bundle exec jekyll serve --detach --port 4000

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Question is, if we can get rid of this change when we killed grunt and npm? I would like to know who (which script) creates this dir

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sry for write this unclear.

this directory will create by bundle install --deployment

Generating... Error reading file /home/travis/build/ClemensSahs/phpughh.github.com/vendor/bundle/ruby/1.9.1/gems/RedCloth-4.2.9/spec/fixtures/lists.yml: Don't know how to add to a NilClass!

This we need to build the the page with jekyll serve.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah ok, right. Then it have to stay obviously 🐳

pygments: true

# Themes are encouraged to use these universal variables
16 changes: 16 additions & 0 deletions tests/test_meetup.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
casper.options.logLevel = "error";
casper.options.verbose = false;

casper.test.begin('check meetup widget', function suite(test) {
casper

.start('http://127.0.0.1:4000/index.html')

.then(function() {
test.assertExists('.next');
})

.run(function() {
test.done();
});
});