This file contains hidden or 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
| data = [ | |
| title: "Cat A" | |
| items: [{name: "foo"},{name: "bar"}] | |
| , | |
| title: "Cat b" | |
| items: [{name: "hello"}, {name: "world"}] | |
| ] |
This file contains hidden or 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
| (def book-price 8) | |
| (def discounts [1 1 0.95 0.90 0.80 0.75]) | |
| (defn price [books] | |
| (let [uniques (set books) | |
| discount (discounts (count uniques))] | |
| (+ (* (count uniques) book-price discount))) (price (remove books uniques))) |
This file contains hidden or 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
| div A single activity | |
| ul.activity | |
| li.date | |
| li.activity | |
| li.comment | |
| li.user | |
| div Multiple activities | |
| table | |
| tr |
This file contains hidden or 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
| ----------------- | |
| my_world.rb | |
| class MyWorld | |
| def initialize | |
| @king = King.new | |
| end | |
| def king_of_the_world |
This file contains hidden or 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
| ----------------- | |
| my_world.rb | |
| class MyWorld | |
| def initialize | |
| @king = King.new | |
| end | |
| def king_of_the_world |
This file contains hidden or 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
| Scenario: Sending REST import first with user defined test environment and then without | |
| Given I have sent a request with optional parameter "environment_txt" with value "Emulator" via the REST API | |
| When the client sends file "sim.xml" via the REST API | |
| Then the REST result "ok" is "1" | |
| And I should be able to view the latest created report | |
| Then I should see "Hardware: N900" |
This file contains hidden or 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
| # clone your fork of qa-reports from gitorious | |
| git clone [email protected]:~shaofengtang/meego-quality-assurance/release-version-qa-reports.git | |
| # create a branch to follow upstream, i.e., qa-reports/master | |
| git checkout -b upstream | |
| # configure upstream repository in order to pull in new changes easily | |
| git remote add upstream git://gitorious.org/meego-quality-assurance/qa-reports.git | |
| git pull upstream master |
This file contains hidden or 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
| #!/bin/bash -le | |
| rvm use ree | |
| # Run integration tests | |
| export DISPLAY=:99 | |
| /etc/init.d/xvfb start | |
| RAILS_ENV=test rake cucumber:ci | |
| RESULT=$? |
This file contains hidden or 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
| var mongoose = require('mongoose'); | |
| var db = mongoose.connect('mongodb://localhost/mydb'); | |
| var Schema = mongoose.Schema; | |
| var Posts = new Schema({ | |
| name : String, | |
| subject: String, | |
| comment : String, | |
| password: String, | |
| }); |