- (/) suite hooks
- before(:suite)
- after(:suite)
- (/) skip some conditions
- xit
- it 'SPECIFICATION ONLY'
- tagged example
- it 'SPEC' => { ENV_FOO => 1 } => sub { ... };
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 table_at(selector) | |
| Nokogiri::HTML(page.body).css(selector).map do |table| | |
| table.css('tr').map do |tr| | |
| tr.css('td').map { |td| td.text.strip } | |
| end | |
| end[0].reject(&:empty?) | |
| end |
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
| $ find local/lib/perl5 -name "README.pod" | |
| local/lib/perl5/App/README.pod | |
| local/lib/perl5/LWP/UserAgent/DNS/README.pod | |
| local/lib/perl5/Test/Deep/README.pod | |
| local/lib/perl5/Test/Fake/README.pod |
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
| use OAuth::Lite::Consumer; | |
| use Furl 2.08; | |
| my $oauth = OAuth::Lite::Consumer->new( | |
| ua => Furl->new(keep_request => 1), | |
| ); | |
| my %args = ( | |
| method => 'POST', | |
| url => 'http://example.com/oauth', |
- carton install -f /path/to/cpanfile
- enable to specify "carton bundle" cache path
- move 02packages from .cpan/ to cache path
- enable "via" in cpanfile
requires 'carton',
via => 'git://github.com/masaki/carton.git',
commitish => 'devel';
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
| Can't convert 'Module::CPANfile::Requirement=HASH(0x96855c8)': Invalid version format (non-numeric data) | |
| ! Couldn't find module or a distribution Amon2::Lite~Module::CPANfile::Requirement=HASH(0x8f3a910) () |
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 | |
| [ -e "$HOME/.plenv" ] && rm -rf $HOME/.plenv | |
| git clone [email protected]:tokuhirom/plenv.git $HOME/.plenv | |
| echo '[ -d "$HOME/.plenv/bin" ] && [ `echo $PATH | grep "$HOME/.plenv/bin"` ] || export PATH="$HOME/.plenv/bin:$PATH"' >> $HOME/.zshrc | |
| echo 'if which plenv > /dev/null; then eval "$(plenv init -)"; fi' >>$HOME/.zshrc | |
| mkdir -p $HOME/.plenv/plugins | |
| git clone [email protected]:tokuhirom/Perl-Build.git $HOME/.plenv/plugins/perl-build |
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
| package Test::mysqld::Persistent; | |
| use strict; | |
| use warnings; | |
| use Test::mysqld; | |
| use JSON; | |
| use File::Spec; | |
| sub new { | |
| my ($class, %args) = @_; |
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
| diff --git a/bin/make_sandbox_from_installed b/bin/make_sandbox_from_installed | |
| index 7b3b5d8..47976c0 100755 | |
| --- a/bin/make_sandbox_from_installed | |
| +++ b/bin/make_sandbox_from_installed | |
| @@ -98,8 +98,13 @@ for my $prefix (@prefixes) { | |
| { | |
| $found_install_db =1; | |
| } | |
| - if ( glob("$prefix/lib/mysql/libmysqlclient*") | |
| - or glob( "$prefix/lib/libmysqlclient*") ) { |
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
| desc 1 before all | |
| cont 1 before all | |
| desc 1 before each | |
| cont 1 before each | |
| exam 1 before | |
| exam 1 after | |
| cont 1 after each | |
| desc 1 after each | |
| cont 1-1 before all | |
| desc 1 before each |