##Integration capybara with minitest
Requirements:
- ruby 1.9
- gem capybara
All you have to do is to require file test_helper.rb at the beginning of your test files.
import { async, ComponentFixture, TestBed } from '@angular/core/testing'; | |
import { HistoryComponent } from './history.component'; | |
fdescribe('HistoryComponent', () => { | |
let component: HistoryComponent; | |
let fixture: ComponentFixture<HistoryComponent>; | |
beforeEach(async(() => { | |
TestBed.configureTestingModule({ |
import 'dart:async'; | |
import 'dart:math' show Random; | |
final random = Random(); | |
// Mock data for a list of messages | |
const messageList = [ | |
{ | |
'message': 'Message 1', | |
'timestamp': 1, |
/* | |
Copyright 2018 The Chromium Authors. All rights reserved. | |
Redistribution and use in source and binary forms, with or without | |
modification, are permitted provided that the following conditions are | |
met: | |
* Redistributions of source code must retain the above copyright | |
notice, this list of conditions and the following disclaimer. | |
* Redistributions in binary form must reproduce the above |
// App | |
import { Component } from '@angular/core'; | |
@Component({ | |
selector: 'app', | |
template: '<span>{{ sayHello() }}</span>', | |
}) | |
export class App { | |
public name: string = 'John'; |
import DS from 'ember-data'; | |
export default DS.FixtureAdapter.extend(); |
#WIP | |
#spec/spec_helper.rb | |
RSpec.configure do |config| | |
#Only for selenium based tested filtered with :js => true on tests | |
#eg: describe "Some test", :js => true do | |
# end | |
config.around(:each, :js => true) do |example| |
# Adapted for Rspec2. This won't work in RSpec 1. | |
# Put this code in acceptance_helper.rb or better in a new file spec/acceptance/support/javascript.rb | |
Rspec.configure do |config| | |
config.before(:each) do | |
Capybara.current_driver = :selenium if example.metadata[:js] | |
end | |
config.after(:each) do |
##Integration capybara with minitest
Requirements:
All you have to do is to require file test_helper.rb at the beginning of your test files.
Feature: Demo | |
Yahoo authentication | |
@user_login | |
Scenario: logging in as user | |
Given I am in "http://mail.yahoo.com" | |
Then I should see "Sign in to Yahoo!" | |
And I fill in userid with "YOUR_USERID" and password "YOUR_PASSWORD" | |
And I press "Sign In" | |
Then I should be logged in and find "INBOX" |
package no.muda.jetty; | |
import org.constretto.ConstrettoBuilder; | |
import org.constretto.ConstrettoConfiguration; | |
import org.eclipse.jetty.server.Server; | |
import org.eclipse.jetty.server.handler.HandlerList; | |
import org.eclipse.jetty.webapp.WebAppContext; | |
import org.springframework.core.io.DefaultResourceLoader; | |
import java.io.IOException; |