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
require 'rubygems' | |
require 'test/unit' | |
require 'bewildr' | |
class BewildrTest < Test::Unit::TestCase | |
def setup | |
#start the app and wait for the main window | |
@app, @main_window = Bewildr::Application.start_app_and_wait_for_window("./features/support/BewildrTestApp.exe", /Bewildr/) | |
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
require 'rubygems' | |
require 'spec' | |
require 'bewildr' | |
describe "my example app" do | |
it "should allow valid users to log in" do | |
#start the app and wait for the main window | |
@app, @main_window = Bewildr::Application.start_app_and_wait_for_window("c:\\my_app.exe", /My App v1.\d+/) | |
username_field = @main_window.get(:id => "username") |
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
# Copyright (c) 2010, Nathaniel Ritmeyer. All rights reserved. | |
# | |
# http://www.natontesting.com | |
# | |
# Save this in a file called 'unused.rb' in your 'features/support' directory. Then, to list | |
# all the unused steps in your project, run the following command: | |
# | |
# cucumber -d -f Cucumber::Formatter::Unused | |
# | |
# or... |
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
require "rspec/core/formatters/base_text_formatter" | |
class ProgressWithNames < RSpec::Core::Formatters::BaseTextFormatter | |
def example_passed(example) | |
super(example) | |
output.print green(". #{example.full_description}\n") | |
end | |
def example_pending(example) | |
super(example) |
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
/* | |
Create a console app, add references to the various white libraries and use the following as a template for operating the Open Dialog window | |
Get the white binaries from here: http://white.codeplex.com/ | |
*/ | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Windows.Automation; | |
using White.Core; | |
using White.Core.UIItems; |
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
class RSpec::Core::Example | |
def passed? | |
@exception.nil? | |
end | |
def failed? | |
!passed? | |
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
require 'rubygems' | |
require 'rspec/core/rake_task' | |
require 'cucumber/rake/task' | |
include Rake::DSL | |
desc "Acceptance Tests" | |
RSpec::Core::RakeTask.new do |t| | |
t.pattern = "spec/**/*_spec.rb" | |
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
namespace Counter | |
{ | |
public class Counter | |
{ | |
private int currentCount; | |
public Counter() | |
{ | |
currentCount = 0; | |
} |
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
namespace Counter | |
{ | |
public class Counter | |
{ | |
private int currentCount; | |
public Counter() | |
{ | |
currentCount = 0; | |
} |
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
public void reset() | |
{ | |
currentCount = 0; | |
} |
OlderNewer